Project

General

Profile

Feature #1790

rbd: have a way of establishing configured mappings at boot time

Added by Anonymous almost 8 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12/06/2011
Due date:
% Done:

0%

Spent time:
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

We need to be careful about the config format, to make automatic editing easy (think Chef).

First draft:

/etc/ceph/rbd.d/NAME.conf is used as ceph.conf to map image called NAME.
You can drop in multiple .conf files in that directory.

Two major use cases:

1)
ln -s /etc/ceph/ceph.conf /etc/ceph/rbd.d/foo.conf
maps image "foo" at boot time with the main ceph.conf settings, with the keyrings configured there

2)
install -m0600 appropriate-keyring /etc/ceph/rbd.d/bar.keyring
cat >>/etc/ceph/rbd.d/bar.conf <<EOF
[global]
...
keyring = bar.keyring
EOF

History

#1 Updated by Wido den Hollander almost 8 years ago

What if your image is not in the pool "rbd" ?

I was thinking about a 'rbdtab' file:

#Monitor(s)            #Args                                       #Pool           #Image
192.168.1.6            id=admin,secret=/etc/ceph/secret            rbd             alpha
192.168.1.6            id=admin,secret=/etc/ceph/secret            rbd2            beta

Wouldn't that be easier?

#2 Updated by Anonymous almost 8 years ago

Single-file configuration is more annoying to handle with automated tools, file-per-device gives you good atomicity on manipulating the configuration.

Your point about pools in very good. I originally thought of putting "[rbd foo]" etc inside the config file, but I'm really hesitant to add special-purpose, more dynamic, fields/sections into the config file, and feel this is on a different level from ceph.conf anyway.

Perhaps /etc/ceph/rbd.d/ANYTHINGUNIQUEHERE.conf with contents like

image = NAME # maybe leave out to take from name of conf file
pool = notrbd # leave out for default "rbd"
id = cephkeythatcanmaprbd # leave out for default "admin"
config = /etc/ceph/non-default-ceph.conf # leave out for default

#3 Updated by Sage Weil about 7 years ago

  • Project changed from Ceph to rbd

#5 Updated by Josh Durgin almost 6 years ago

  • Status changed from New to Resolved

commit:a4ddf704868832e119d7949e96fe35ab1920f06a

Also available in: Atom PDF