while not self.stop_event.is_set():
self.stop_event.wait(timeout=30)
try:
- run.wait(
- ctx.cluster.run(
- args=['sudo', 'logrotate', '/etc/logrotate.d/ceph-test.conf'
- ],
- wait=False,
- )
+ p = ctx.cluster.run(
+ args=['sudo', 'logrotate', '/etc/logrotate.d/ceph-test.conf'],
+ wait=False,
+ stderr=StringIO()
)
+ run.wait(p)
except exceptions.ConnectionLostError as e:
# Some tests may power off nodes during test, in which
# case we will see connection errors that we should ignore.
log.debug("Missed logrotate, EOFError")
except SSHException:
log.debug("Missed logrotate, SSHException")
+ except run.CommandFailedError as e:
+ err = p.stderr.getvalue()
+ if 'error: error renaming temp state file' in err:
+ log.info('ignoring transient state error: %s', e)
+ else:
+ raise
except socket.error as e:
if e.errno in (errno.EHOSTUNREACH, errno.ECONNRESET):
log.debug("Missed logrotate, host unreachable")