It seems juju would fail if the value is empty.
2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: 2024-01-06 05:47:06 WARNING unit.ceph-mon/0.config-changed logger.go:60 Error EINVAL: unrecognized config option 'mgr/prometheus/rbd_stats_pools' 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: 2024-01-06 05:47:06 ERROR unit.ceph-mon/0.juju-log server.go:316 Uncaught exception while in charm code: 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: Traceback (most recent call last): 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "./src/charm.py", line 310, in <module> 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: main(CephMonCharm) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/ops/main.py", line 436, in main 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: _emit_charm_event(charm, dispatcher.event_name) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/ops/main.py", line 144, in _emit_charm_event 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: event_to_emit.emit(*args, **kwargs) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/ops/framework.py", line 351, in emit 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: framework._emit(event) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/ops/framework.py", line 853, in _emit 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: self._reemit(event_path) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/ops/framework.py", line 942, in _reemit 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: custom_handler(event) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/ops_openstack/core.py", line 260, in _on_config 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: self.on_config(event) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "./src/charm.py", line 87, in on_config 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: if hooks.config_changed(): 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/charmhelpers/contrib/hardening/harden.py", line 90, in _harden_inner2 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: return f(*args, **kwargs) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/src/ceph_hooks.py", line 381, in config_changed 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: mgr_config_set_rbd_stats_pools() 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/src/utils.py", line 427, in mgr_config_set_rbd_stats_pools 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: ceph_utils.mgr_config_set( 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/var/lib/juju/agents/unit-ceph-mon-0/charm/venv/charms_ceph/utils.py", line 3569, in ceph_config_set 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: subprocess.check_call(['ceph', 'config', 'set', who, name, value]) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: File "/usr/lib/python3.8/subprocess.py", line 364, in check_call 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: raise CalledProcessError(retcode, cmd) 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: subprocess.CalledProcessError: Command '['ceph', 'config', 'set', 'mgr', 'mgr/prometheus/rbd_stats_pools', '']' returned non-zero exit status 22. 2024-01-06 05:47:08 [ERROR] unit-ceph-mon-0.log: 2024-01-06 05:47:07 ERROR juju.worker.uniter.operation runhook.go:153 hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1
It seems juju would fail if the value is empty.
2024-01-06 05:47:08 [ERROR] unit-ceph- mon-0.log: 2024-01-06 05:47:06 WARNING unit.ceph- mon/0.config- changed logger.go:60 Error EINVAL: unrecognized config option 'mgr/prometheus /rbd_stats_ pools' mon-0.log: 2024-01-06 05:47:06 ERROR unit.ceph- mon/0.juju- log server.go:316 Uncaught exception while in charm code: mon-0.log: Traceback (most recent call last): mon-0.log: File "./src/charm.py", line 310, in <module> mon-0.log: main(CephMonCharm) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/ops/ main.py" , line 436, in main mon-0.log: _emit_charm_ event(charm, dispatcher. event_name) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/ops/ main.py" , line 144, in _emit_charm_event mon-0.log: event_to_ emit.emit( *args, **kwargs) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/ops/ framework. py", line 351, in emit mon-0.log: framework. _emit(event) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/ops/ framework. py", line 853, in _emit mon-0.log: self._reemit( event_path) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/ops/ framework. py", line 942, in _reemit mon-0.log: custom_ handler( event) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/ops_ openstack/ core.py" , line 260, in _on_config mon-0.log: self.on_ config( event) mon-0.log: File "./src/charm.py", line 87, in on_config mon-0.log: if hooks.config_ changed( ): mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/charmhelpe rs/contrib/ hardening/ harden. py", line 90, in _harden_inner2 mon-0.log: return f(*args, **kwargs) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ src/ceph_ hooks.py" , line 381, in config_changed mon-0.log: mgr_config_ set_rbd_ stats_pools( ) mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ src/utils. py", line 427, in mgr_config_ set_rbd_ stats_pools mon-0.log: ceph_utils. mgr_config_ set( mon-0.log: File "/var/lib/ juju/agents/ unit-ceph- mon-0/charm/ venv/charms_ ceph/utils. py", line 3569, in ceph_config_set mon-0.log: subprocess. check_call( ['ceph' , 'config', 'set', who, name, value]) mon-0.log: File "/usr/lib/ python3. 8/subprocess. py", line 364, in check_call mon-0.log: raise CalledProcessEr ror(retcode, cmd) mon-0.log: subprocess. CalledProcessEr ror: Command '['ceph', 'config', 'set', 'mgr', 'mgr/prometheus /rbd_stats_ pools', '']' returned non-zero exit status 22. mon-0.log: 2024-01-06 05:47:07 ERROR juju.worker. uniter. operation runhook.go:153 hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-
2024-01-06 05:47:08 [ERROR] unit-ceph-