]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks: make the cephadm and vstart_runner tasks aware of watchdog
authorLaura Flores <lflores@ibm.com>
Tue, 4 Nov 2025 21:10:42 +0000 (15:10 -0600)
committerLaura Flores <lflores@ibm.com>
Thu, 6 Nov 2025 16:32:09 +0000 (10:32 -0600)
The WatchedProcesses class was added in https://github.com/ceph/ceph/pull/64889/commits
to help the DaemonWatchdog montior processes. In https://github.com/ceph/ceph/pull/64889/commits/7ee026be4e7ef07502507dfb7975c74bc8c85fc5,
an attribute 'watched_processes' was added to the cluster context to track
a list of processes. This was added to the ceph task (in ceph.py), but for
tests that use the cephadm task instead (cephadm.py), we need to add it there too.
This applies to `thrash-old-clients` and `upgrade` tests in particular.

To be on the safe side, we should also initialize 'watched_processes' for vstart_runner
in case someone opts into the watchdog there in the future.

This commit also unifies the quotation marks for the 'watched_processes' attribute in the
ceph task with the other attributes. No major logic is changed here- it is only for convention.

Fixes: https://tracker.ceph.com/issues/73682
Signed-off-by: Laura Flores <lflores@ibm.com>
qa/tasks/ceph.py
qa/tasks/cephadm.py
qa/tasks/vstart_runner.py

index ea860a135f9911c6f40188cdf4a7afee0889dc21..1c14194703b6f2785b8450fb98ac4a4a844a748c 100644 (file)
@@ -528,7 +528,7 @@ def cephfs_setup(ctx, config):
 @contextlib.contextmanager
 def watchdog_setup(ctx, config):
     ctx.ceph[config['cluster']].thrashers = []
-    ctx.ceph[config["cluster"]].watched_processes = []
+    ctx.ceph[config['cluster']].watched_processes = []
     ctx.ceph[config['cluster']].watchdog = DaemonWatchdog(ctx, config)
     ctx.ceph[config['cluster']].watchdog.start()
     yield
index 5d48c904e619c64c314c3b82037999acc6bebfef..f1c77f1adcfd835a4d703bd96b4651024f4033e9 100644 (file)
@@ -1387,12 +1387,13 @@ def ceph_clients(ctx, config):
 
 @contextlib.contextmanager
 def watchdog_setup(ctx, config):
-    if 'watchdog_setup' in config: 
-        ctx.ceph[config['cluster']].thrashers = []
-        ctx.ceph[config['cluster']].watchdog = DaemonWatchdog(ctx, config, ctx.ceph[config['cluster']].thrashers)
+    ctx.ceph[config['cluster']].thrashers = []
+    ctx.ceph[config['cluster']].watched_processes = []
+    if 'watchdog_setup' in config:
+        ctx.ceph[config['cluster']].watchdog = DaemonWatchdog(ctx, config)
         ctx.ceph[config['cluster']].watchdog.start()
     else:
-        ctx.ceph[config['cluster']].watchdog = None 
+        ctx.ceph[config['cluster']].watchdog = None
     yield
 
 @contextlib.contextmanager
index 755ea642d95da27845c191f8d30f63c37a685aea..6920c5144740f1d13753b1e6f37240bc1e03ed73 100644 (file)
@@ -1070,6 +1070,7 @@ class LocalContext(object):
         cluster_namespace = Namespace()
         cluster_namespace.fsid = FSID
         cluster_namespace.thrashers = []
+        cluster_namespace.watched_processes = []
         self.ceph = {cluster_name: cluster_namespace}
         self.teuthology_config = teuth_config
         self.cluster = LocalCluster()