diff --git a/test/dlc_tests/sanity/test_telemetry.py b/test/dlc_tests/sanity/test_telemetry.py index 064fcd326d73..88d5eb3d608b 100644 --- a/test/dlc_tests/sanity/test_telemetry.py +++ b/test/dlc_tests/sanity/test_telemetry.py @@ -305,7 +305,7 @@ def _run_tag_failure_IMDSv1_disabled(image_uri, ec2_client, ec2_instance, ec2_co ec2_client.delete_tags(Resources=[ec2_instance_id], Tags=[{"Key": expected_tag_key}]) # Disable access to EC2 instance metadata - ec2_connection.run(f"sudo apt-get update -y") + ec2_utils.kill_background_processes_and_run_apt_get_update(ec2_connection) ec2_connection.run(f"sudo apt-get install -y apt-transport-https") ec2_connection.run(f"sudo apt-get install -y net-tools") ec2_connection.run(f"sudo route add -host 169.254.169.254 reject")