]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/telegraf: catch FileNotFoundError exception 34468/head
authorKefu Chai <kchai@redhat.com>
Wed, 8 Apr 2020 12:21:25 +0000 (20:21 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 8 Apr 2020 12:25:52 +0000 (20:25 +0800)
commitf6d028dfa0c24d43c33670f1bb4547a6310963ea
treef006ed530050b38023af3b01a9726f086fc1f006
parente4690c6a667b23e7e53e7f39c22e2528714c8088
mgr/telegraf: catch FileNotFoundError exception

in tasks/module_selftest.yaml, `TestModuleSelftest.test_telegraf()` is
called. but we fail to prepare a unix domain socket to which the telegraf
module can send stats. and telegraf module does not catch
FileNotFoundError exception, so the exception is populated to ceph-mgr
and is found by the test, hence the test is marked a failure whenever
telegraf is tested.

in this change,

* catch this exception, so it won't be caught by ceph-mgr
* whitelist the error message, so the test can pass

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/suites/rados/mgr/tasks/module_selftest.yaml
src/pybind/mgr/telegraf/module.py