]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/telegraf: catch FileNotFoundError exception
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 13:07:07 +0000 (21:07 +0800)
commit83c632099bdaefcf02f4e2275e5795b300b6b854
treea6ee91782d726a51c782f7ce32f5353f129a03d5
parentf28a5fef3b8ddb97962f91cc78174fd6e1431fed
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