ceph-ansible/library
Guillaume Abrioux ed79bc7a4e ceph_volume: fix bug in `is_lv()`
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>
2021-03-23 19:58:27 +01:00
..
__init__.py tests for the ceph_volume module 2017-12-11 09:58:06 -06:00
ceph_add_users_buckets.py library: flake8 ceph-ansible modules 2020-10-01 11:23:52 +02:00
ceph_crush.py library: move `fatal()` into ca_common.py 2021-01-27 15:46:43 +01:00
ceph_crush_rule.py library: add ceph_crush_rule module 2020-12-01 17:52:41 +01:00
ceph_dashboard_user.py library: refact ceph_dashboard_user 2021-01-07 17:09:46 -05:00
ceph_ec_profile.py module_utils: refactor 2020-11-26 11:21:09 +01:00
ceph_facts Discover rbd facts. 2018-11-20 15:06:01 +01:00
ceph_fs.py module_utils: refactor 2020-11-26 11:21:09 +01:00
ceph_key.py library: move `fatal()` into ca_common.py 2021-01-27 15:46:43 +01:00
ceph_mgr_module.py library: fix idempotency in ceph_mgr_module 2021-02-03 08:30:44 +01:00
ceph_osd.py library: add ceph_osd module 2020-11-30 16:53:45 +01:00
ceph_osd_flag.py library: add ceph_osd_flag module 2020-12-01 10:29:11 +01:00
ceph_pool.py library: add missing `target_size_ratio` parameter support in ceph_pool module 2020-12-16 15:10:27 +01:00
ceph_volume.py ceph_volume: fix bug in `is_lv()` 2021-03-23 19:58:27 +01:00
ceph_volume_simple_activate.py library: use exit_module from ca_common 2020-11-26 09:13:31 +01:00
ceph_volume_simple_scan.py library: use exit_module from ca_common 2020-11-26 09:13:31 +01:00
cephadm_adopt.py library: make cephadm_adopt module idempotent 2021-01-29 21:07:39 +01:00
cephadm_bootstrap.py library/cephadm_bootstrap: add registry support 2021-02-03 08:27:28 +01:00
config_template Using config_template 2015-12-16 17:19:50 +01:00
igw_client.py iscsi module linting 2018-10-30 14:41:36 +01:00
igw_gateway.py igw: Add check for mismatch ceph-iscsi and iscsigws.yml settings 2019-07-03 22:13:19 +02:00
igw_lun.py library: flake8 ceph-ansible modules 2020-10-01 11:23:52 +02:00
igw_purge.py library: flake8 ceph-ansible modules 2020-10-01 11:23:52 +02:00
radosgw_realm.py library: add realm pull to radosgw_realm module 2021-03-12 18:21:37 +01:00
radosgw_user.py library: add no_log to {access,secret}_key params 2021-01-06 10:11:39 +01:00
radosgw_zone.py library: retrieve realm id for zone/zonegroup 2021-01-29 21:07:39 +01:00
radosgw_zonegroup.py library: retrieve realm id for zone/zonegroup 2021-01-29 21:07:39 +01:00