From b73a7ca1d3afd417cdea91812da2cac75997ec7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 19 Aug 2026 15:42:27 -0300 Subject: [PATCH 1/2] fix(ci): bound the apt network steps with timeouts and retries The PR test job ran apt-get against the xcat.org repository with no time limit of its own. When the repository stalled, the job hung on the update step until the sixty minute workflow limit canceled the run, and the log gave no reason. Wrap the apt-get update and install steps in a timeout command and give apt a transfer timeout with retries. A stalled repository now fails the step in minutes, the driver prints its install error report, and a rerun is possible at once. --- github_action_xcat_test.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/github_action_xcat_test.pl b/github_action_xcat_test.pl index dd8eed589..53e118fbf 100644 --- a/github_action_xcat_test.pl +++ b/github_action_xcat_test.pl @@ -352,7 +352,7 @@ sub install_xcat{ "sudo chmod 777 /etc/apt/sources.list", "sudo echo \"deb [arch=amd64 allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/latest/xcat-dep noble main\" >> /etc/apt/sources.list", "sudo echo \"deb [arch=ppc64el allow-insecure=yes] http://xcat.org/files/xcat/repos/apt/latest/xcat-dep noble main\" >> /etc/apt/sources.list", - "sudo apt-get -qq --allow-insecure-repositories update"); + "sudo timeout 600 apt-get -qq -o Acquire::Retries=3 -o Acquire::http::Timeout=30 --allow-insecure-repositories update"); chdir $ENV{RUNNER_WORKSPACE};; my @output; @@ -369,7 +369,7 @@ sub install_xcat{ } } - my $cmd = "sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y xcat --allow-remove-essential --allow-unauthenticated"; + my $cmd = "sudo timeout 1200 env DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 install -y xcat --allow-remove-essential --allow-unauthenticated"; @output = runcmd("$cmd"); if($::RUNCMD_RC){ my $lastline = $output[-1]; @@ -404,7 +404,7 @@ sub install_xcat{ print "[install_xcat] $cmd....[Pass]\n"; } } - $cmd = "sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y xcat-probe --allow-remove-essential --allow-unauthenticated"; + $cmd = "sudo timeout 1200 env DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 install -y xcat-probe --allow-remove-essential --allow-unauthenticated"; @output = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[install_xcat] $cmd ....[Failed]\n"; @@ -510,7 +510,7 @@ sub check_syntax{ # Return code: #-------------------------------------------------------- sub run_fast_regression_test{ - my $cmd = "sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y xcat-test --allow-remove-essential --allow-unauthenticated"; + my $cmd = "sudo timeout 1200 env DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 install -y xcat-test --allow-remove-essential --allow-unauthenticated"; my @output = runcmd("$cmd"); if($::RUNCMD_RC){ print RED "[run_fast_regression_test] $cmd ....[Failed]\n"; From 32b99b9d643bd8dbb61b1f003eaee81e0b9d05d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 19 Aug 2026 16:02:38 -0300 Subject: [PATCH 2/2] test(ci): require the bounded noninteractive apt install form The guard held the exact unbounded apt-get install text, so the new timeout wrapper failed it. Require the timeout command and allow the apt transfer options, so an unbounded install now fails the guard. --- xCAT-test/unit/github_action_noninteractive_install.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/unit/github_action_noninteractive_install.t b/xCAT-test/unit/github_action_noninteractive_install.t index 2c54b7cd6..f3dbdca29 100644 --- a/xCAT-test/unit/github_action_noninteractive_install.t +++ b/xCAT-test/unit/github_action_noninteractive_install.t @@ -24,8 +24,8 @@ close($workflow_fh); for my $package (qw(xcat xcat-probe xcat-test)) { like( $contents, - qr{sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y \Q$package\E\b}, - "$package installation is noninteractive" + qr{sudo timeout \d+ env DEBIAN_FRONTEND=noninteractive apt-get (?:-o \S+ )*install -y \Q$package\E }, + "$package installation is noninteractive and bounded" ); }