Skip to content

Commit

Permalink
Merge #105390
Browse files Browse the repository at this point in the history
105390: ci: allow apt background update to finish before updating packages r=rickystewart a=rail

Previously, we run `apt` commands that required exclusive lock at the start of the bootstrap script.

Some base images (like the FIPS one) have daily apt autoupgrade cronjob, which is started on boot by systemd.

This PR gives the cronjob some time to finish before proceeding with `apt` commands.

Epic: none
Release note: None

Co-authored-by: Rail Aliiev <[email protected]>
  • Loading branch information
craig[bot] and rail committed Jun 22, 2023
2 parents 90e55b5 + 70f86a7 commit 12b723c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/packer/teamcity-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0EBFCD88
cat > /etc/apt/sources.list.d/docker.list <<EOF
deb https://download.docker.com/linux/ubuntu focal stable
EOF
# Some images come with apt autoupgrade job running at start, let's give it a few minutes to finish to avoid races.
echo "Sleeping for 3 minutes to allow apt daily cronjob to finish..."
sleep 3m
apt-get update --yes

# Install the sudo version patched for CVE-2021-3156
Expand Down

0 comments on commit 12b723c

Please sign in to comment.