Skip to content

Commit

Permalink
DAOS-16592 test: Agent failure test changes.
Browse files Browse the repository at this point in the history
Skip-build: true

Summary: Agent failure test changes to support ECBs.

Signed-off-by: Padmanabhan <[email protected]>
  • Loading branch information
rpadma2 authored and daltonbohning committed Jan 27, 2025
1 parent ddcb69f commit e3106d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/tests/ftest/deployment/agent_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def test_agent_failure_isolation(self):
since = journalctl_time()
self.log.info("Stopping agent on %s", agent_host_kill)
pattern = self.agent_managers[0].manager.job.command_regex
detected, running = stop_processes(self.log, hosts=agent_host_kill, pattern=pattern)
detected, running = stop_processes(self.log, hosts=agent_host_kill, pattern=pattern,
user=self.agent_managers[0].manager.job.run_user)
if not detected:
msg = "No daos_agent process killed on {}!".format(agent_host_kill)
errors.append(msg)
Expand Down
6 changes: 3 additions & 3 deletions src/tests/ftest/util/run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def find_command(source, pattern, depth, other=None):


def stop_processes(log, hosts, pattern, verbose=True, timeout=60, exclude=None, force=False,
full_command=False):
full_command=False, user="root"):
"""Stop the processes on each hosts that match the pattern.
Args:
Expand Down Expand Up @@ -625,9 +625,9 @@ def stop_processes(log, hosts, pattern, verbose=True, timeout=60, exclude=None,
log.debug(
"Killing%s any processes on %s that match %s and then waiting %s seconds",
step[0], result.passed_hosts, pattern_match, step[1])
kill_command = f"sudo -n /usr/bin/pkill{step[0]} {pattern}"
kill_command = command_as_user(f"/usr/bin/pkill{step[0]} {pattern}", user)
if full_command:
kill_command = f"sudo -n /usr/bin/pkill{step[0]} --full -x {pattern}"
kill_command = command_as_user(f"/usr/bin/pkill{step[0]} --full -x {pattern}", user)
run_remote(log, result.passed_hosts, kill_command, verbose, timeout)
time.sleep(step[1])
result = run_remote(log, result.passed_hosts, search_command, verbose, timeout)
Expand Down

0 comments on commit e3106d8

Please sign in to comment.