mirror of https://github.com/ceph/ceph-ansible.git
43c7c20fa9
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_crush_rule.py | ||
ceph_dashboard_user.py | ||
ceph_ec_profile.py | ||
ceph_facts | ||
ceph_fs.py | ||
ceph_key.py | ||
ceph_mgr_module.py | ||
ceph_osd.py | ||
ceph_osd_flag.py | ||
ceph_pool.py | ||
ceph_volume.py | ||
ceph_volume_simple_activate.py | ||
ceph_volume_simple_scan.py | ||
cephadm_adopt.py | ||
cephadm_bootstrap.py | ||
config_template | ||
igw_client.py | ||
igw_gateway.py | ||
igw_lun.py | ||
igw_purge.py | ||
radosgw_realm.py | ||
radosgw_user.py | ||
radosgw_zone.py | ||
radosgw_zonegroup.py |