]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
raw: fix activate args
authorSage Weil <sage@redhat.com>
Wed, 18 Dec 2019 14:27:47 +0000 (08:27 -0600)
committerJan Fajerski <jfajerski@suse.com>
Fri, 28 Feb 2020 09:34:30 +0000 (10:34 +0100)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 5e9d9179b15808a26e6421d2a1772bbbadc3d408)

src/ceph-volume/ceph_volume/devices/raw/activate.py
src/ceph-volume/ceph_volume/devices/raw/create.py

index 90ba8c0b0791a1f26191b96c1644ba4c5603c377..d4db4bc5452612f44769f827ff257d451be2c1fb 100644 (file)
@@ -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)
index 3d64e812f26f13799aeea8e438cfafe52d01fcc8..97e38582709f20dfa36042ff6b575a99536e021c 100644 (file)
@@ -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')