]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: raw: activate: drop --all, --osd-id and --osd-fsid args
authorSage Weil <sage@redhat.com>
Mon, 13 Jan 2020 23:51:19 +0000 (17:51 -0600)
committerJan Fajerski <jfajerski@suse.com>
Fri, 28 Feb 2020 09:34:30 +0000 (10:34 +0100)
We don't need these currently.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e7b8b5c46550ee707b09e35015fabea8c6a0c918)

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

index d4db4bc5452612f44769f827ff257d451be2c1fb..bb5454d9c087ebb28513c1dae4400a929ce1192a 100644 (file)
@@ -70,24 +70,14 @@ class Activate(object):
         self.args = None
 
     @decorators.needs_root
-    def activate(self, devices, tmpfs, systemd,
-                 only_osd_id=None,
-                 only_osd_fsid=None):
+    def activate(self, devices, tmpfs, systemd):
         """
         :param args: The parsed arguments coming from the CLI
         """
-        if devices:
-            found = direct_report(devices)
-        else:
-            found = direct_report(None)
+        assert devices
+        found = direct_report(devices)
 
         for osd_id, meta in found.items():
-            if only_osd_id and only_osd_fsid and \
-               (only_osd_id != osd_id or only_osd_fsid != meta['osd_uuid']):
-                logger.debug('ignoring osd.%d uuid %s cluster %s' % (
-                    osd_id, meta['osd_uuid'], meta['ceph_fsid']))
-                continue
-
             logger.info('Activating osd.%s uuid %s cluster %s' % (
                     osd_id, meta['osd_uuid'], meta['ceph_fsid']))
             activate_bluestore(meta,
@@ -111,24 +101,10 @@ class Activate(object):
             description=sub_command_help,
         )
 
-        parser.add_argument(
-            '--osd-id',
-            help='The ID of the OSD, usually an integer, like 0'
-        )
-        parser.add_argument(
-            '--osd-fsid',
-            help='The UUID of the OSD'
-        )
         parser.add_argument(
             '--device',
-            nargs='*',
+            nargs='+',
             help='The device(s) for the OSD to start')
-        parser.add_argument(
-            '--all',
-            dest='activate_all',
-            action='store_true',
-            help='Activate all OSDs found in the system',
-        )
         parser.add_argument(
             '--no-systemd',
             dest='no_systemd',
@@ -144,14 +120,9 @@ class Activate(object):
             return
         args = parser.parse_args(self.argv)
         self.args = args
-        if not args.device and not args.activate_all and not (args.osd_id and args.osd_fsid):
-            terminal.error('must specify one of --device, --activate-all, or --osd-id and --osd-fsid')
-            raise SystemExit(1)
         if not args.no_systemd:
             terminal.error('systemd support not yet implemented')
             raise SystemExit(1)
         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)
+                      systemd=not self.args.no_systemd)