Skip to content

Commit c63157a

Browse files
[integ-test] Install lsof before running lsof command
lsof is not pre-installed on all OSes
1 parent b59fb4e commit c63157a

File tree

1 file changed

+5
-0
lines changed
  • tests/integration-tests/tests/common

1 file changed

+5
-0
lines changed

tests/integration-tests/tests/common/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@ def get_compute_ip_to_num_files(remote_command_executor, slurm_commands):
502502
instance_ip_to_num_files = {}
503503
for node_name in compute_node_names:
504504
compute_node_instance_ip = slurm_commands.get_node_addr(node_name)
505+
install_cmd = (
506+
f"ssh -q {compute_node_instance_ip} 'sudo yum install -y lsof "
507+
"|| sudo apt-get update && sudo apt-get install -y lsof'"
508+
)
509+
remote_command_executor.run_remote_command(install_cmd, raise_on_error=False)
505510
lsof_cmd = f"ssh -q {compute_node_instance_ip} 'sudo lsof -p $(pgrep computemgtd) | wc -l'"
506511
num_files = remote_command_executor.run_remote_command(lsof_cmd).stdout
507512
instance_ip_to_num_files[compute_node_instance_ip] = num_files

0 commit comments

Comments
 (0)