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 <gabrioux@redhat.com>
pull/5893/head
Guillaume Abrioux 2020-10-02 16:12:13 +02:00
parent e49a5241f0
commit ec52e93cba
1 changed files with 2 additions and 0 deletions

View 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