mirror of
https://github.com/ceph/ceph
synced 2025-03-07 08:49:15 +00:00
qa: configure zabbix properly before selftest
Even though the selftest routine doesn't care about the settings, we should set them to avoid emitting nasty log/health messages when enabling the module. Fixes: http://tracker.ceph.com/issues/22514 Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
213af8b666
commit
c64c9ff00d
@ -47,6 +47,12 @@ class MgrCluster(CephCluster):
|
||||
def get_standby_ids(self):
|
||||
return [s['name'] for s in self.get_mgr_map()["standbys"]]
|
||||
|
||||
def set_module_conf(self, module, key, val):
|
||||
self.mon_manager.raw_cluster_cmd("config-key", "set",
|
||||
"mgr/{0}/{1}".format(
|
||||
module, key
|
||||
), val)
|
||||
|
||||
def set_module_localized_conf(self, module, mgr_id, key, val):
|
||||
self.mon_manager.raw_cluster_cmd("config-key", "set",
|
||||
"mgr/{0}/{1}/{2}".format(
|
||||
|
@ -24,6 +24,10 @@ class TestModuleSelftest(MgrTestCase):
|
||||
self.mgr_cluster.mon_manager.raw_cluster_cmd(module_name, "self-test")
|
||||
|
||||
def test_zabbix(self):
|
||||
# Set these mandatory config fields so that the zabbix module
|
||||
# won't trigger health/log errors on load/serve.
|
||||
self.mgr_cluster.set_module_conf("zabbix", "zabbix_host", "localhost")
|
||||
self.mgr_cluster.set_module_conf("zabbix", "identifier", "foo")
|
||||
self._selftest_plugin("zabbix")
|
||||
|
||||
def test_prometheus(self):
|
||||
|
Loading…
Reference in New Issue
Block a user