]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks/cephadm: ignore tarfile.ReadError
authorKefu Chai <kchai@redhat.com>
Tue, 19 May 2020 11:09:26 +0000 (19:09 +0800)
committerSebastian Wagner <sebastian.wagner@suse.com>
Thu, 21 May 2020 21:33:18 +0000 (23:33 +0200)
commitc6d2275f27f3b20e8d673b4361f4407b2f5ea4cf
treef98a0f99b4cb2e9db0122a3c3107babdea6f90b4
parent252fde688d954fbb5ba4cfd0e32368ee87fee860
qa/tasks/cephadm: ignore tarfile.ReadError

there is chance that /var/log/ceph (and other directories) is not
created when cephadm fails, but we always try to collect /var/log/ceph
by tar the directory on the test node and transfer it back for archiving
it. when we fail to do so, an exception is thrown, and this exception is
in turn logged as the cause of the failure instead of the one which
fails the test.

in this change, `tarfile.TarError`s is caught and ignored if it is
thrown by `misc.pull_directory()`, as normally, we don't consider it a fatal
failure when `misc.pull_directory()` fails because of `tar`. the
failures for the test are.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d67b0f1e3ac12d2b38ab6455b5311bcb051acb05)
qa/tasks/cephadm.py