Project

General

Profile

Actions

Feature #1790

closed

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

Added by Anonymous over 12 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% 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

Actions #1

Updated by Wido den Hollander over 12 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?

Actions #2

Updated by Anonymous over 12 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

Actions #3

Updated by Sage Weil almost 12 years ago

  • Project changed from Ceph to rbd
Actions #5

Updated by Josh Durgin over 10 years ago

  • Status changed from New to Resolved

commit:a4ddf704868832e119d7949e96fe35ab1920f06a

Actions

Also available in: Atom PDF