From: Sage Weil Date: Wed, 18 Dec 2019 14:27:47 +0000 (-0600) Subject: raw: fix activate args X-Git-Tag: v13.2.9~44^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=245a7eaa5bf70c2d6371e364c82b0ca4a9e65569;p=ceph.git raw: fix activate args Signed-off-by: Sage Weil (cherry picked from commit 5e9d9179b15808a26e6421d2a1772bbbadc3d408) --- diff --git a/src/ceph-volume/ceph_volume/devices/raw/activate.py b/src/ceph-volume/ceph_volume/devices/raw/activate.py index 90ba8c0b0791a..d4db4bc545261 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/activate.py +++ b/src/ceph-volume/ceph_volume/devices/raw/activate.py @@ -70,7 +70,9 @@ class Activate(object): self.args = None @decorators.needs_root - def activate(self, devices=None, only_osd_id=None, only_osd_fsid=None): + def activate(self, devices, tmpfs, systemd, + only_osd_id=None, + only_osd_fsid=None): """ :param args: The parsed arguments coming from the CLI """ @@ -89,8 +91,8 @@ class Activate(object): logger.info('Activating osd.%s uuid %s cluster %s' % ( osd_id, meta['osd_uuid'], meta['ceph_fsid'])) activate_bluestore(meta, - tmpfs=not self.args.no_tmpfs, - systemd=not self.args.no_systemd) + tmpfs=tmpfs, + systemd=systemd) def main(self): sub_command_help = dedent(""" @@ -148,4 +150,8 @@ class Activate(object): if not args.no_systemd: terminal.error('systemd support not yet implemented') raise SystemExit(1) - self.activate(args.device, args.osd_id, args.osd_fsid, not args.no_tmpfs) + self.activate(args.device, + tmpfs=not args.no_tmpfs, + systemd=not self.args.no_systemd, + only_osd_id=args.osd_id, + only_osd_fsid=args.osd_fsid) diff --git a/src/ceph-volume/ceph_volume/devices/raw/create.py b/src/ceph-volume/ceph_volume/devices/raw/create.py index 3d64e812f26f1..97e38582709f2 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/create.py +++ b/src/ceph-volume/ceph_volume/devices/raw/create.py @@ -35,7 +35,9 @@ class Create(object): # back. a = Activate([]) a.args = self.args - a.activate([args.data]) + a.activate([args.data], + tmpfs=not args.no_tmpfs, + systemd=not args.no_systemd) except Exception: logger.exception('raw activate was unable to complete, while creating the OSD') logger.info('will rollback OSD ID creation')