]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.activate warn when no osds are found with --all
authorAlfredo Deza <adeza@redhat.com>
Thu, 29 Mar 2018 18:02:25 +0000 (14:02 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Thu, 19 Apr 2018 16:31:21 +0000 (12:31 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 967938a0cf4353e99eb55815cde4ee90d6d4b79b)

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

index d47b696106da89ed747f4991daba32fe27d52463..be813f8319fb0f8a63aecbf5aaa540f86d3e98e6 100644 (file)
@@ -193,6 +193,10 @@ class Activate(object):
                 if fsid:
                     osds[fsid] = osd_id
                     break
+        if not osds:
+            terminal.warning('Was unable to find any OSDs to activate')
+            terminal.warning('Verify OSDs are present with "ceph-volume lvm list"')
+            return
         for osd_fsid, osd_id in osds.items():
             if systemctl.osd_is_active(osd_id):
                 terminal.warning(