From: Kyr Shatskyy Date: Fri, 4 Sep 2020 20:53:05 +0000 (+0200) Subject: task/ansible: reset fail_log file index X-Git-Tag: 1.1.0~47^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ca86159dda758f4c4890c0983a2c987ed8572c8c;p=teuthology.git task/ansible: reset fail_log file index The yaml.safe_load reads the fail_log opened file and shifts the offset to the end of stream. However in case of error we need to shift offset to the begin of the file stream, so we can read data again. Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index 823bb20fc0..9103b357e2 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -307,6 +307,7 @@ class Ansible(Task): self.failure_log.name, e ) ) + fail_log.seek(0) failures = fail_log.read().replace('\n', '') if failures: