Skip to content

Commit 8d48da6

Browse files
authored
fix apt lock issue (#34)
1 parent 9855dd2 commit 8d48da6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

terraform/cloud-init/ubuntu.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# Add OKE repo & install the package
44
add-apt-repository -y 'deb [trusted=yes] https://odx-oke.objectstorage.us-sanjose-1.oci.customer-oci.com/n/odx-oke/b/okn-repositories/o/prod/ubuntu-jammy/kubernetes-1.29 stable main'
55

6+
while fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do
7+
echo "Waiting for other apt instances to exit"
8+
# Sleep to avoid pegging a CPU core while polling this lock
9+
sleep 1
10+
done
11+
12+
apt update
13+
614
apt install -y oci-oke-node-all*
715

816
oke bootstrap --manage-gpu-services

0 commit comments

Comments
 (0)