]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/telegraf: catch FileNotFoundError exception 34628/head
authorKefu Chai <kchai@redhat.com>
Wed, 8 Apr 2020 12:21:25 +0000 (20:21 +0800)
committerShyukri Shyukriev <shshyukriev@suse.com>
Sat, 18 Apr 2020 15:16:38 +0000 (18:16 +0300)
commitcc6d895a2e463b8bbe41433b2298a9922f654a00
tree32f3a91d55eb4f248f7db22500cd94396fd2ba4a
parent09535662287f93553c9a8457028861b66982735d
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>
(cherry picked from commit f6d028dfa0c24d43c33670f1bb4547a6310963ea)
qa/suites/rados/mgr/tasks/module_selftest.yaml
src/pybind/mgr/telegraf/module.py