Repository navigation
fix(gpu): preserve customer-installed PIS drivers #9702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d9ddd90
24ac59e
b9d6f12
9f9a275
a58444b
5497dfd
8fcd0d9
bf12a51
1334403
678a7dd
114abe7
b0b9773
d6440ae
c25cfd6
258161f
bb146cc
6ea6f6a
def56f1
6358f7f
ff45bef
1976e57
ad20823
bb5b398
89580d9
a547f29
3022615
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -407,6 +407,18 @@ EOF | |
| logs_to_events "AKS.CSE.ensureContainerd.ensureArtifactStreaming" ensureArtifactStreaming || exit $ERR_ARTIFACT_STREAMING_INSTALL | ||
| fi | ||
|
|
||
| if [ "${PRE_PROVISION_ONLY}" = "true" ] && [ "${GPU_NODE}" != "true" ] && | ||
| { [ "${OS}" = "${UBUNTU_OS_NAME}" ] || { isMarinerOrAzureLinux "$OS" "$OS_VARIANT" && ! isAzureLinuxOSGuard "$OS" "$OS_VARIANT"; }; }; then | ||
| if [ "${OS}" = "${UBUNTU_OS_NAME}" ]; then | ||
| if [ ! -r /opt/azure/containers/provision_installs_ubuntu_gpu.sh ]; then | ||
| echo "image containing PIS GPU cleanup helper required" | ||
| exit $ERR_NVIDIA_DRIVER_INSTALL | ||
| fi | ||
| source /opt/azure/containers/provision_installs_ubuntu_gpu.sh || exit $ERR_NVIDIA_DRIVER_INSTALL | ||
| fi | ||
| logs_to_events "AKS.CSE.cleanUpGPUDriversForBasePrep" cleanUpGPUDriversForBasePrep || exit $ERR_NVIDIA_DRIVER_INSTALL | ||
| fi | ||
|
|
||
| # Enable localdns to handle node and pod DNS traffic via a local CoreDNS instance. | ||
| # If hosts plugin is enabled, enableAKSLocalDNSHostsSetup() was already called at the | ||
| # very start of basePrep (before disableSystemdResolved) to give the timer a head start | ||
|
|
@@ -645,7 +657,7 @@ function nodePrep { | |
|
|
||
|
|
||
| # Clean up GPU drivers if not a GPU node or if skipping driver install | ||
| if [ "${GPU_NODE}" != "true" ] || [ "${skip_nvidia_driver_install}" = "true" ]; then | ||
| if [ "${BASE_PREP_RAN}" = "true" ] && { [ "${GPU_NODE}" != "true" ] || [ "${skip_nvidia_driver_install}" = "true" ]; }; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick - make the lifecycle policy explicit beside this guard. The comment above still describes only the old GPU conditions. The important new condition is that cleanup runs only when basePrep ran in this execution, so PIS-derived nodes retain customer-installed drivers. Please consider updating that comment and initializing |
||
| logs_to_events "AKS.CSE.cleanUpGPUDrivers" cleanUpGPUDrivers | ||
| fi | ||
|
|
||
|
|
@@ -753,6 +765,7 @@ logs_to_events "AKS.CSE.configureNodeTimeSync" configure_node_time_sync_or_repor | |
|
|
||
| if [ ! -f /opt/azure/containers/base_prep.complete ]; then | ||
| basePrep | ||
| BASE_PREP_RAN=true | ||
| else | ||
| echo "Skipping basePrep - base_prep.complete file exists" | ||
| fi | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comments explaining how this test works - it looks like it creates a temp executable file that overrides lsmod, but that took a while to figure out and the next dev shouldn't have to think so hard about what the test's doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, a better test might be to run the script in a container with the actual lsmod swapped out. I'm not sure we need the test anyway - there are prob better ways to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed—the PATH substitution needs a short explanation. The test puts fake
lsmodandsudoexecutables first on PATH so driver checks report healthy on a machine without a GPU. It runs the actual validation script first with the staged installer missing, then present. This protects against the earlier false pass wherenvidia-smiworked even though cleanup had deleted customer files.I'll add a concise comment describing that setup. I'd keep this targeted local test rather than introduce a container dependency; the live PIS E2E separately exercises the real driver and commands.