Set DEBIAN_FRONTEND to be noninteractive for containerd installing.

This was causing annoying timeout issues on BuildKite where the cgroupsv2
agents that are on ubuntu-2110 image to get stuck indefinitely.

Also rollback the experimental changes in pre-command hook to simplify scripts
and make things consistent.

PiperOrigin-RevId: 432671125
This commit is contained in:
Ayush Ranjan 2022-03-05 11:14:41 -08:00 committed by gVisor bot
parent b1ceabc884
commit e3f424c5c5
2 changed files with 2 additions and 7 deletions

View File

@ -4,13 +4,7 @@ function install_pkgs() {
export DEBIAN_FRONTEND=noninteractive
while true; do
if sudo -E apt-get update && \
sudo -E apt-get install -y \
-o Dpkg::Options::=--force-confold \
-o Dpkg::Options::=--force-confdef \
--allow-downgrades \
--allow-remove-essential \
--allow-change-held-packages \
"$@"; then
sudo -E apt-get install -y "$@"; then
break
fi
done

View File

@ -62,6 +62,7 @@ fi
readonly BTRFS_DEV
# Install dependencies for the crictl tests.
export DEBIAN_FRONTEND=noninteractive
while true; do
if (apt-get update && apt-get install -y \
"${BTRFS_DEV}" \