]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume simple.activate only check for missing id and uuid if file is not passed in
authorAlfredo Deza <adeza@redhat.com>
Wed, 8 Nov 2017 19:50:16 +0000 (14:50 -0500)
committerAlfredo Deza <adeza@redhat.com>
Mon, 13 Nov 2017 15:20:20 +0000 (10:20 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 826c2709dd5ab0fbf6eb419a735d15e718a7712c)

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

index 1a15718e2ee9c21a740ef53c8308da0ca27bcf3e..e6959aa1806044dd507011a52925bd246ab1e7a7 100644 (file)
@@ -124,10 +124,11 @@ class Activate(object):
             print(sub_command_help)
             return
         args = parser.parse_args(self.argv)
-        if not args.osd_id and not args.osd_fsid:
-            terminal.error('ID and FSID are required to find the right OSD to activate')
-            terminal.error('from a scanned OSD location in /etc/ceph/osd/')
-            raise RuntimeError('Unable to activate without both ID and FSID')
+        if not args.file:
+            if not args.osd_id and not args.osd_fsid:
+                terminal.error('ID and FSID are required to find the right OSD to activate')
+                terminal.error('from a scanned OSD location in /etc/ceph/osd/')
+                raise RuntimeError('Unable to activate without both ID and FSID')
         # don't allow a CLI flag to specify the JSON dir, because that might
         # implicitly indicate that it would be possible to activate a json file
         # at a non-default location which would not work at boot time if the