]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: ignore logrotate state rename error
authorPatrick Donnelly <pdonnell@redhat.com>
Sun, 20 Sep 2020 21:05:13 +0000 (14:05 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Sun, 20 Sep 2020 21:05:13 +0000 (14:05 -0700)
This is hopefully a transient issue that can be ignored.

Fixes: https://tracker.ceph.com/issues/42433
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/ceph.py

index c73f25b34ab628b02a1391dac79fafbead10023c..2276c5bd2b2c07530d19ae8dbfbfa4f5442614ca 100644 (file)
@@ -177,13 +177,12 @@ def ceph_log(ctx, config):
             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.
@@ -197,6 +196,12 @@ def ceph_log(ctx, config):
                     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")