]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: print the lvm activate success message correctly
authorAndrew Schoen <aschoen@redhat.com>
Wed, 17 Jan 2018 17:44:10 +0000 (11:44 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 17 Jan 2018 17:44:10 +0000 (11:44 -0600)
Move the terminal.success to the methods that have access to the
correct osd_id so that they do not print None for the osd_id
in the log message.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/activate.py

index 2a7b0778bd7513064576fd8e8af2501365203d2c..c95cf799116f5800b32ec211af2987cf790f0870 100644 (file)
@@ -54,6 +54,7 @@ def activate_filestore(lvs):
 
     # start the OSD
     systemctl.start_osd(osd_id)
+    terminal.success("ceph-volume lvm activate successful for osd ID: %s" % osd_id)
 
 
 def get_osd_device_path(osd_lv, lvs, device_type):
@@ -126,6 +127,7 @@ def activate_bluestore(lvs):
 
     # start the OSD
     systemctl.start_osd(osd_id)
+    terminal.success("ceph-volume lvm activate successful for osd ID: %s" % osd_id)
 
 
 class Activate(object):
@@ -161,7 +163,6 @@ class Activate(object):
             activate_bluestore(lvs)
         elif args.filestore:
             activate_filestore(lvs)
-        terminal.success("ceph-volume lvm activate successful for osd ID: %s" % args.osd_id)
 
     def main(self):
         sub_command_help = dedent("""