Project

General

Profile

Bug #3253

ceph-disk-activate: support clusters not named "ceph"

Added by Anonymous over 6 years ago. Updated over 1 year ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
10/02/2012
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
luminous,jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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

Revision 80af5fb8 (diff)
Added by Sage Weil over 6 years ago

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

Revision 19a2cf58 (diff)
Added by Sage Weil about 6 years ago

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 <>
(cherry picked from commit 80af5fb887f30792c342ac16da9ed95d7e89e491)

History

#1 Updated by Anonymous over 6 years ago

  • Tracker changed from Bug to Feature

#2 Updated by Anonymous over 6 years ago

  • translation missing: en.field_position set to 232

#3 Updated by Sage Weil over 6 years ago

  • translation missing: en.field_position deleted (262)
  • translation missing: en.field_position set to 55

#4 Updated by Sage Weil over 6 years ago

  • translation missing: en.field_position deleted (55)
  • translation missing: en.field_position set to 43

#5 Updated by Sage Weil over 6 years ago

  • Target version set to v0.60

#6 Updated by Sage Weil over 6 years ago

  • Status changed from New to Resolved

#7 Updated by Dan Mick about 6 years ago

Confused; I still see this in mount_activate:

  1. TODO always using mount options from cluster=ceph for
  2. now; see http://tracker.newdream.net/issues/3253
    mount_options = get_conf(
    cluster='ceph',

#8 Updated by Alfredo Deza almost 2 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 Loic Dachary over 1 year ago

  • Tracker changed from Feature to Bug
  • Status changed from New to In Progress
  • Assignee set to Loic Dachary
  • Regression set to No
  • Severity set to 3 - minor

#10 Updated by Loic Dachary over 1 year ago

  • Backport set to luminous,jewel

#11 Updated by Kefu Chai over 1 year ago

  • Status changed from In Progress to Need Review

#12 Updated by Loic Dachary over 1 year ago

  • Assignee deleted (Loic Dachary)

#13 Updated by Kefu Chai over 1 year ago

  • Status changed from Need Review to Won't Fix

Also available in: Atom PDF