]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: add timeout to 'GC' ceph_objectstore_tool calls
authorRonen Friedman <rfriedma@redhat.com>
Sat, 18 Apr 2026 16:32:03 +0000 (16:32 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 28 Apr 2026 05:11:06 +0000 (05:11 +0000)
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
qa/tasks/ceph_objectstore_tool.py

index 84e6e8ca4a1c966c1534ce095e8bc22dc749c1cd..ba978dbb29929b9657c1d6b8efee49b712dd63fb 100644 (file)
@@ -706,19 +706,17 @@ def test_objectstore(ctx, config, cli_remote, REP_POOL, REP_NAME, ec=False):
         if CRIMSON and config.get('gc_before_restart', False):
             # Run GC on each OSD's seastore to reclaim segments consumed
             # by repeated tool mount/unmount cycles before restarting.
-            log.info("Running GC on each OSD store...")
+            gc_timeout = config.get('gc_timeout', 120)
+            log.info("Running GC on each OSD store (timeout={})...".format(
+                gc_timeout))
             for remote in osds.remotes.keys():
                 for role in osds.remotes[remote]:
                     if not role.startswith("osd."):
                         continue
                     osdid = int(role.split('.')[1])
-                    cmd = (prefix + "--op gc").format(id=osdid)
-                    try:
-                        remote.sh(cmd, wait=True)
-                    except CommandFailedError as e:
-                        log.warning(
-                            "GC failed on osd.{id} with {ret}".format(
-                                id=osdid, ret=e.exitstatus))
+                    cmd = ("timeout {timeout} " + prefix + "--op gc").format(
+                        timeout=gc_timeout, id=osdid)
+                    remote.sh(cmd, wait=True)
 
         log.info("Restarting OSDs....")
         # They are still look to be up because of setting nodown