Skip to content

Commit

Permalink
[integ-tests] Use command suitable for both RHEL and Ubuntu to retrie…
Browse files Browse the repository at this point in the history
…ve network device name

The old command only works on RHEL.

Signed-off-by: Hanwen <[email protected]>
  • Loading branch information
hanwen-pcluste committed Jun 12, 2024
1 parent eddf078 commit bfbf7ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/integration-tests/tests/schedulers/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,9 +1793,7 @@ def _test_torque_job_submit(remote_command_executor, test_datadir):
def _submit_kill_networking_job(remote_command_executor, scheduler_commands, partition, node_type, num_nodes):
"""Submit job that will detach network interface on compute."""
# Get network interface name from Head node, assuming Head node and Compute are of the same instance type
interface_name = remote_command_executor.run_remote_command(
"nmcli device status | grep ether | awk '{print $1}'"
).stdout
interface_name = remote_command_executor.run_remote_command("ls /sys/class/net | grep e").stdout
logging.info("Detaching network interface {} on {} Compute nodes".format(interface_name, node_type))
# Submit job that will detach network interface on all dynamic nodes
return scheduler_commands.submit_command_and_assert_job_accepted(
Expand Down

0 comments on commit bfbf7ef

Please sign in to comment.