• Guillaume Abrioux's avatar
    ceph_volume: fix bug in `is_lv()` · ed79bc7a
    Guillaume Abrioux authored
    This function makes the `ceph_volume` module be not idempotent in
    containerized context because it tries to run a container and bindmount
    directories that no longer exist.
    In that case, the `lvs` command being executed returns something
    different than `0` so we can't call `json.loads(out)['report'][0]['lv']`
    since it might throw an python error.
    The idea is to return `True` only if `rc` is equal to `0` and
    `len(result)` is greater than `0`, which means the command matched an
    Fixes: #6284
    Signed-off-by: default avatarGuillaume Abrioux <gabrioux@redhat.com>