Skip to content

Commit

Permalink
fix(velero): fails to install nfs-common on ubuntu 22.04 due to deps (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh authored Oct 24, 2024
1 parent 2cd3bd1 commit efcb1d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/common/host-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,18 @@ function _dpkg_install_host_packages() {
return 0
fi

DEBIAN_FRONTEND=noninteractive dpkg --install --force-depends-version --force-confold --auto-deconfigure "${fullpath}"/*.deb
# first install attempt can fail with pre-dependency problems
# retrying seems to fix the issue
for i in {1..3} ; do
if DEBIAN_FRONTEND=noninteractive dpkg --install --force-depends-version --force-confold --auto-deconfigure "${fullpath}"/*.deb ; then
break
fi
if [ "$i" -eq 3 ]; then
logFail "Failed to install host packages ${packages[*]}"
return 1
fi
logWarn "Failed to install host packages ${packages[*]}, retrying..."
done

logSuccess "Host packages ${packages[*]} installed"

Expand Down

0 comments on commit efcb1d5

Please sign in to comment.