]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-volume: dirty hack
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 2 Oct 2020 14:12:13 +0000 (16:12 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Sun, 4 Oct 2020 09:19:15 +0000 (11:19 +0200)
ceph-volume recently introduced a breaking change because of a `lvm
batch` refactor.
when rerunning `lvm batch --report --format json` on existing OSDs, it
doesn't output a valid json on stdout.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
library/ceph_volume.py

index 58100d03dfaa6bd36335be092835d07d0515df4f..e3e29e6ab4a3b2f8d0204f25896ab696e3b48da7 100644 (file)
@@ -691,6 +691,8 @@ def run_module():
         rc, cmd, out, err = exec_command(
             module, batch_report_cmd)
         try:
+            if not out:
+                out = '{}'
             report_result = json.loads(out)
         except ValueError:
             strategy_changed_in_out = "strategy changed" in out