mirror of https://github.com/ceph/ceph-ansible.git
b46d2bf0a6
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
LV.
Fixes: #6284
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
__init__.py | ||
ceph_add_users_buckets.py | ||
ceph_crush.py | ||
ceph_facts | ||
ceph_key.py | ||
ceph_osd_flag.py | ||
ceph_volume.py | ||
config_template | ||
igw_client.py | ||
igw_gateway.py | ||
igw_lun.py | ||
igw_purge.py |