Skip to content

Commit e9e0772

Browse files
cameronmeissnerganeshkumarashoklilypan26
authored
cherry-pick: fix: remove nvidia pkg list during cleanup (#7333) (#7431)
Co-authored-by: Ganeshkumar Ashokavardhanan <35557827+ganeshkumarashok@users.noreply.github.com> Co-authored-by: Lily Pan <lilylpan0426@gmail.com>
1 parent b5385a4 commit e9e0772

File tree

109 files changed

+244
-205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+244
-205
lines changed

parts/linux/cloud-init/artifacts/azlosguard/cse_install_osguard.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ ensureRunc() {
7878
stub
7979
}
8080

81+
removeNvidiaRepos() {
82+
stub
83+
}
84+
8185
cleanUpGPUDrivers() {
8286
stub
8387
}

parts/linux/cloud-init/artifacts/cse_config.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,11 @@ configGPUDrivers() {
905905
fi
906906

907907
retrycmd_if_failure 120 5 25 pkill -SIGHUP containerd || exit $ERR_GPU_DRIVERS_INSTALL_TIMEOUT
908+
909+
# Remove NVIDIA repos after GPU driver installation is complete
910+
# This prevents automatic updates from upgrading Nvidia repo dependencies and eliminates
911+
# the need for users to allowlist NVIDIA repository URLs in their firewalls
912+
removeNvidiaRepos
908913
}
909914

910915
validateGPUDrivers() {

parts/linux/cloud-init/artifacts/flatcar/cse_install_flatcar.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ ensureRunc() {
2828
stub
2929
}
3030

31+
removeNvidiaRepos() {
32+
stub
33+
}
34+
3135
cleanUpGPUDrivers() {
3236
rm -Rf $GPU_DEST /opt/gpu
3337
}

parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,23 @@ ensureRunc() {
447447
echo "Mariner Runc is included in the Mariner base image or containerd installation. Skipping downloading and installing Runc"
448448
}
449449

450+
removeNvidiaRepos() {
451+
# Remove NVIDIA dnf repository configuration
452+
# to prevent unnecessary network calls during dnf makecache/update
453+
if [ -f /etc/yum.repos.d/nvidia-built-azurelinux.repo ]; then
454+
rm -f /etc/yum.repos.d/nvidia-built-azurelinux.repo
455+
echo "Removed NVIDIA dnf repository"
456+
fi
457+
}
458+
450459
cleanUpGPUDrivers() {
451460
rm -Rf $GPU_DEST /opt/gpu
452461

453462
for packageName in $(managedGPUPackageList); do
454463
rm -rf "/opt/${packageName}"
455464
done
465+
466+
removeNvidiaRepos
456467
}
457468

458469
downloadContainerdFromVersion() {

parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,27 @@ installNvidiaManagedExpPkgFromCache() {
156156
done
157157
}
158158

159+
removeNvidiaRepos() {
160+
# Remove NVIDIA apt repository configuration
161+
# to prevent unnecessary network calls during apt-get update
162+
if [ -f /etc/apt/sources.list.d/nvidia.list ]; then
163+
rm -f /etc/apt/sources.list.d/nvidia.list
164+
echo "Removed NVIDIA apt repository"
165+
fi
166+
if [ -f /etc/apt/keyrings/nvidia.pub ]; then
167+
rm -f /etc/apt/keyrings/nvidia.pub
168+
echo "Removed NVIDIA GPG key"
169+
fi
170+
}
171+
159172
cleanUpGPUDrivers() {
160173
rm -Rf $GPU_DEST /opt/gpu
161174

162175
for packageName in $(managedGPUPackageList); do
163176
rm -rf "/opt/${packageName}"
164177
done
178+
179+
removeNvidiaRepos
165180
}
166181

167182
installCriCtlPackage() {

pkg/agent/testdata/AKSUbuntu1604+Containerd/CustomData

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu1604+CustomKubeletConfig+CustomLinuxOSConfig/CustomData

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu1604+CustomKubeletConfig+DynamicKubeletConfig/CustomData

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu1604+Disable1804SystemdResolved=false/CustomData

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu1604+Disable1804SystemdResolved=true/CustomData

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)