Project

General

Profile

Actions

Bug #12458

closed

rbdmap should be changed to map a rbd automatically when starup

Added by chuanhong wang almost 9 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

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".
    [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]#
    
Actions #1

Updated by Kefu Chai over 8 years ago

  • Description updated (diff)
  • Category set to 26
Actions #2

Updated by Kefu Chai over 8 years ago

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".

keyfile is a key-only file, see http://ceph.com/docs/master/rados/configuration/auth-config-ref/

and please see http://ceph.com/docs/master/man/8/rbd/#cmdoption-rbd--keyfile .

oh, right, the "-h" help message is not in sync with the man page. will fix it. thanks.

Actions #3

Updated by Kefu Chai over 8 years ago

  • Category deleted (26)
Actions #4

Updated by Kefu Chai over 8 years ago

  • Status changed from New to Resolved
Actions #5

Updated by Kefu Chai over 8 years ago

  • Status changed from Resolved to 12
Actions #6

Updated by Kefu Chai over 8 years ago

  • Status changed from 12 to New
Actions #8

Updated by Sage Weil about 7 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF