Project

General

Profile

Bug #12458

Updated by Kefu Chai almost 9 years ago

environment:centos7+ceph v0.87 
 problem: 

 # 1, the function do_map() in /etc/init.d/rbdmap will do post-mapping checking after mapped a new image, but the directory /etc/ceph/rbd.d/ doesn't exist at all and isn't created automaticall. Therefore, the “rbdmap” sctrip failed to do post-mapping checking. 
 # 

 2. In /etc/ceph/rbdmap, auth parameter "id=client,keyring=/etc/ceph/ceph.client.keyring" is not correct, and it should be "id=admin,keyring=/etc/ceph/ceph.client.admin.keyring", user without "client." prefix. 
 # 

 3. the parameter "--keyfile" cant't be used when map a rbd, and it can be replaced by "--keyring". There is no description of "--keyring" in the helping info of "rbd -h". 
 <pre> 
 [root@c8 src]# rbd map im1 --id admin --keyfile /etc/ceph/ceph.client.admin.keyring  
 rbd: failed to get secret 
 rbd: map failed: (22) Invalid argument 
 2015-07-24 23:27:03.415795 7f585deaf880 -1 auth: failed to decode key '[client.admin] 
         key = AQByfqZVOAGSAhAAGnjXsO2WZpK1qT7ZNQ9IgA== 
         auid = 0 
         caps mds = "allow" 
         caps mon = "allow *" 
         caps osd = "allow *" 
 [root@c8 src]# rbd map im1 --id admin --keyring /etc/ceph/ceph.client.admin.keyring  
 /dev/rbd2 
 [root@c8 src]# rbd -h |grep keyring 
 [root@c8 src]# 
 </pre>

Back