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>
@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
@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
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()