diff --git a/src/ceph-disk/ceph_disk/main.py b/src/ceph-disk/ceph_disk/main.py index 30e7e16b43bf4f..8a62fad365dbb5 100755 --- a/src/ceph-disk/ceph_disk/main.py +++ b/src/ceph-disk/ceph_disk/main.py @@ -3311,6 +3311,12 @@ def main_activate(args): else: raise Error('%s is not a directory or block device' % args.path) + # exit with 0 if the journal device is not up, yet + # journal device will do the activation + if not os.access('{path}/journal'.format(path=osd_data), os.F_OK): + LOG.info("activate: Journal not present, not starting, yet") + return + if (not args.no_start_daemon and args.mark_init == 'none'): command_check_call( [ @@ -3713,6 +3719,12 @@ def main_activate_space(name, args): LOG.info('suppressed activate request on %s', path) return + # warn and exit with 0 if the data device is not up, yet + # data device will do the activation + if not os.access(path, os.F_OK): + LOG.info("activate_space: OSD device not present, not starting, yet") + return + (cluster, osd_id) = mount_activate( dev=path, activate_key_template=args.activate_key_template,