Bug #3253
ceph-disk-activate: support clusters not named "ceph"
0%
Description
When activating an osd data disk, read mount options from ceph.conf, mount the disk, read the cluster uuid, find the right config file, read mount options from that; if they differ, unmount & remount with the new options; only then proceed.
Associated revisions
ceph-disk-activate: identify cluster .conf by fsid
Determine what cluster the disk belongs to by checking the fsid defined
in /etc/ceph/*.conf. Previously we hard-coded 'ceph'.
Note that this has the nice side-effect that if we have a disk with a
bad/different fsid, we now fail to activate it. Previously, we would
mount and start ceph-osd, but the daemon would fail to authenticate
because it was part of the wrong cluster.
Fixes: #3253
Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk-activate: identify cluster .conf by fsid
Determine what cluster the disk belongs to by checking the fsid defined
in /etc/ceph/*.conf. Previously we hard-coded 'ceph'.
Note that this has the nice side-effect that if we have a disk with a
bad/different fsid, we now fail to activate it. Previously, we would
mount and start ceph-osd, but the daemon would fail to authenticate
because it was part of the wrong cluster.
Fixes: #3253
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 80af5fb887f30792c342ac16da9ed95d7e89e491)
History
#1 Updated by Anonymous over 11 years ago
- Tracker changed from Bug to Feature
#2 Updated by Anonymous over 11 years ago
- translation missing: en.field_position set to 232
#3 Updated by Sage Weil about 11 years ago
- translation missing: en.field_position deleted (
262) - translation missing: en.field_position set to 55
#4 Updated by Sage Weil about 11 years ago
- translation missing: en.field_position deleted (
55) - translation missing: en.field_position set to 43
#5 Updated by Sage Weil about 11 years ago
- Target version set to v0.60
#6 Updated by Sage Weil about 11 years ago
- Status changed from New to Resolved
#7 Updated by Dan Mick almost 11 years ago
Confused; I still see this in mount_activate:
- TODO always using mount options from cluster=ceph for
- now; see http://tracker.newdream.net/issues/3253
mount_options = get_conf(
cluster='ceph',
#8 Updated by Alfredo Deza over 6 years ago
- Project changed from devops to Ceph
- Status changed from Resolved to New
- Target version deleted (
v0.60)
The function `mount_activate` still has this hard coded, and it references this ticket.
def mount_activate( dev, activate_key_template, init, dmcrypt, dmcrypt_key_dir, reactivate=False, ): if dmcrypt: part_uuid = get_partition_uuid(dev) dev = dmcrypt_map(dev, dmcrypt_key_dir) try: fstype = detect_fstype(dev=dev) except (subprocess.CalledProcessError, TruncatedLineError, TooManyLinesError) as e: raise FilesystemTypeError( 'device {dev}'.format(dev=dev), e, ) # TODO always using mount options from cluster=ceph for # now; see http://tracker.newdream.net/issues/3253 mount_options = get_mount_options(cluster='ceph', fs_type=fstype) path = mount(dev=dev, fstype=fstype, options=mount_options)
#9 Updated by Loïc Dachary over 6 years ago
- Tracker changed from Feature to Bug
- Status changed from New to In Progress
- Assignee set to Loïc Dachary
- Regression set to No
- Severity set to 3 - minor
#10 Updated by Loïc Dachary over 6 years ago
- Backport set to luminous,jewel
#11 Updated by Kefu Chai over 6 years ago
- Status changed from In Progress to Fix Under Review
#12 Updated by Loïc Dachary over 6 years ago
- Assignee deleted (
Loïc Dachary)
#13 Updated by Kefu Chai over 6 years ago
- Status changed from Fix Under Review to Won't Fix