From: Guillaume Abrioux Date: Fri, 2 Oct 2020 14:12:13 +0000 (+0200) Subject: ceph-volume: dirty hack X-Git-Tag: v6.0.0alpha3~110 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec52e93cba3d8f236e061b999cc1acddb22ef8f0;p=ceph-ansible.git ceph-volume: dirty hack 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 --- diff --git a/library/ceph_volume.py b/library/ceph_volume.py index 58100d03d..e3e29e6ab 100644 --- a/library/ceph_volume.py +++ b/library/ceph_volume.py @@ -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