ceph-ansible/library
Guillaume Abrioux fedb36688d library: fix bug in radosgw_zone.py
If for some reason `get_zonegroup()` returns a failure, we must handle
and make the module exit properly instead of failing with the following
python trace:

```
Traceback (most recent call last):
  File "./AnsiballZ_radosgw_zone.py", line 247, in <module>
    _ansiballz_main()
  File "./AnsiballZ_radosgw_zone.py", line 234, in _ansiballz_main
    exitcode = debug(sys.argv[1], zipped_mod, ANSIBALLZ_PARAMS)
  File "./AnsiballZ_radosgw_zone.py", line 202, in debug
    runpy.run_module(mod_name='ansible.modules.radosgw_zone', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1610728441.41-685133-218973990589597/debug_dir/ansible/modules/radosgw_zone.py", line 467, in <module>
    main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1610728441.41-685133-218973990589597/debug_dir/ansible/modules/radosgw_zone.py", line 463, in main
    run_module()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1610728441.41-685133-218973990589597/debug_dir/ansible/modules/radosgw_zone.py", line 425, in run_module
    zonegroup = json.loads(_out)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2021-01-27 15:46:43 +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: add ceph_mgr_module module 2020-11-30 16:52:02 +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 library: move `fatal()` into ca_common.py 2021-01-27 15:46:43 +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: add cephadm_adopt module 2020-12-02 09:15:44 +01:00
cephadm_bootstrap.py library: add cephadm_bootstrap module 2020-12-01 10:30:05 +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: remove unused module import 2020-11-02 17:20:06 +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: fix bug in radosgw_zone.py 2021-01-27 15:46:43 +01:00
radosgw_zonegroup.py library: remove unused module import 2020-11-02 17:20:06 +01:00