From 9898d1d9464685100b3e0669a9615081ab19cfd2 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 25 Jun 2020 13:33:09 +0200 Subject: [PATCH] ceph-volume: remove unused function This function is never called in raw context, let's remove it. Signed-off-by: Guillaume Abrioux (cherry picked from commit 20e8286f5e1b79678b17659272daa1e28e763618) --- src/ceph-volume/ceph_volume/devices/raw/common.py | 4 ---- src/ceph-volume/ceph_volume/devices/raw/prepare.py | 11 +---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/raw/common.py b/src/ceph-volume/ceph_volume/devices/raw/common.py index 197af3cc848f8..08cfd02890cb0 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/common.py +++ b/src/ceph-volume/ceph_volume/devices/raw/common.py @@ -26,10 +26,6 @@ def create_parser(prog, description): dest='crush_device_class', help='Crush device class to assign this OSD to', ) - parser.add_argument( - '--cluster-fsid', - help='Specify the cluster fsid, useful when no ceph.conf is available', - ) parser.add_argument( '--no-tmpfs', action='store_true', diff --git a/src/ceph-volume/ceph_volume/devices/raw/prepare.py b/src/ceph-volume/ceph_volume/devices/raw/prepare.py index d0d740c1c84b0..3c96eedacf34a 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/prepare.py +++ b/src/ceph-volume/ceph_volume/devices/raw/prepare.py @@ -7,7 +7,7 @@ from ceph_volume.util import prepare as prepare_utils from ceph_volume.util import encryption as encryption_utils from ceph_volume.util import disk from ceph_volume.util import system -from ceph_volume import conf, decorators, terminal +from ceph_volume import decorators, terminal from ceph_volume.devices.lvm.common import rollback_osd from .common import create_parser @@ -97,15 +97,6 @@ class Prepare(object): dmcrypt_log = 'dmcrypt' if args.dmcrypt else 'clear' terminal.success("ceph-volume raw {} prepare successful for: {}".format(dmcrypt_log, self.args.data)) - def get_cluster_fsid(self): - """ - Allows using --cluster-fsid as an argument, but can fallback to reading - from ceph.conf if that is unset (the default behavior). - """ - if self.args.cluster_fsid: - return self.args.cluster_fsid - - return conf.ceph.get('global', 'fsid') @decorators.needs_root def prepare(self): -- 2.39.5