Skip to content

Commit

Permalink
Revert "adding retry logic on yum commands to avoid resource locking"
Browse files Browse the repository at this point in the history
This reverts commit 95e171d.
  • Loading branch information
tsatam committed Apr 15, 2024
1 parent dba176e commit 9ae6287
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions pkg/deploy/generator/scripts/rpVMSS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,11 @@ echo "setting ssh password authentication"
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl reload sshd.service

#Adding retry logic to yum commands in order to avoid stalling out on resource locks
for attempt in {1..5}; do
echo "running RHUI fix"
yum update -y --disablerepo='*' --enablerepo='rhui-microsoft-azure*'
if [[ ${attempt} -lt 5 ]]; then sleep 10; else exit 1; fi
done
echo "running RHUI fix"
yum update -y --disablerepo='*' --enablerepo='rhui-microsoft-azure*'

for attempt in {1..5}; do
echo "running yum update"
yum -y -x WALinuxAgent -x WALinuxAgent-udev update --allowerasing
if [[ ${attempt} -lt 5 ]]; then sleep 10; else exit 1; fi
done
echo "running yum update"
yum -y -x WALinuxAgent -x WALinuxAgent-udev update --allowerasing

echo "extending partition table"
# Linux block devices are inconsistently named
Expand Down

0 comments on commit 9ae6287

Please sign in to comment.