]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.activate safeguard against auto detect objectstore flag not being set
authorAlfredo Deza <adeza@redhat.com>
Mon, 23 Oct 2017 13:20:26 +0000 (09:20 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 27 Oct 2017 14:49:38 +0000 (10:49 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit c9b5f352a8f9e2743e5dca3a0479c8099a59fd12)

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

index dc958fe39dd351eabbb51f03b369854a2f367fcf..b41d508e4d617687dd4c9af948fe9e456f93d7d5 100644 (file)
@@ -137,7 +137,9 @@ class Activate(object):
             lvs.filter(lv_tags={'ceph.osd_fsid': args.osd_fsid})
         if not lvs:
             raise RuntimeError('could not find osd.%s with fsid %s' % (args.osd_id, args.osd_fsid))
-        if args.auto_detect_objectstore:
+        # This argument is only available when passed in directly or via
+        # systemd, not when ``create`` is being used
+        if getattr(args, 'auto_detect_objectstore', False):
             logger.info('auto detecting objectstore')
             # may get multiple lvs, so can't do lvs.get() calls here
             for lv in lvs: