From 161e9657d985aa4ceffad2f56e18edd78ca2a81f Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 8 Nov 2017 14:50:16 -0500 Subject: [PATCH] ceph-volume simple.activate only check for missing id and uuid if file is not passed in Signed-off-by: Alfredo Deza (cherry picked from commit 826c2709dd5ab0fbf6eb419a735d15e718a7712c) --- src/ceph-volume/ceph_volume/devices/simple/activate.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/simple/activate.py b/src/ceph-volume/ceph_volume/devices/simple/activate.py index 1a15718e2ee9..e6959aa18060 100644 --- a/src/ceph-volume/ceph_volume/devices/simple/activate.py +++ b/src/ceph-volume/ceph_volume/devices/simple/activate.py @@ -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 -- 2.47.3