-
Notifications
You must be signed in to change notification settings - Fork 264
feat(gpu): pre-bake CUDA driver into the VHD + tear it down on non-GPU nodes #8786
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
a0a9882
feat(gpu): pre-bake CUDA driver into the VHD + tear it down where it …
ganeshkumarashok 7697798
fix(gpu): harden stage-1 prebake observability (review feedback)
ganeshkumarashok 2793ff4
fix(gpu): keep prebake marker on incomplete teardown + de-flake marke…
ganeshkumarashok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
spec/parts/linux/cloud-init/artifacts/cse_install_ubuntu_spec.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #!/bin/bash | ||
|
|
||
| Describe 'cse_install_ubuntu.sh' | ||
| Include "./parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh" | ||
|
|
||
| Describe 'cleanUpPrebakedGPUDriver' | ||
| It 'is a no-op when the prebake marker is absent' | ||
| GPU_DKMS_MARKER_FILE="/tmp/aks-gpu-marker-absent-$$" | ||
| When call cleanUpPrebakedGPUDriver | ||
| The status should be success | ||
| The output should equal "" | ||
|
ganeshkumarashok marked this conversation as resolved.
|
||
| End | ||
|
|
||
| It 'deregisters the nvidia DKMS module and removes baked artifacts (libs, binaries, marker) when present' | ||
| marker="$(mktemp)" | ||
| GPU_DKMS_MARKER_FILE="${marker}" | ||
| rm() { echo "mock rm $*"; } | ||
| ldconfig() { echo "mock ldconfig"; } | ||
| When call cleanUpPrebakedGPUDriver | ||
| The status should be success | ||
| The output should include "Removing pre-baked NVIDIA driver" | ||
| # deregisters via the DKMS source tree + built module removal (no slow dkms remove) | ||
| The output should include "mock rm -rf /var/lib/dkms/nvidia" | ||
| The output should include "mock rm -f /lib/modules" | ||
| # relocated userspace libs | ||
| The output should include "mock rm -rf /usr/bin/lib64" | ||
| # driver userspace binaries so nvidia-smi becomes "command not found" on non-GPU nodes | ||
| The output should include "mock rm -f /usr/bin/nvidia-smi" | ||
| The output should include "mock ldconfig" | ||
| # the slow per-version dkms remove --all must NOT be on the critical path anymore | ||
| The output should not include "dkms remove" | ||
| # stage-1 observability: a structured outcome line is emitted. Here rm is mocked, so the | ||
| # marker is left in place and the cleanup correctly reports an incomplete (security-gap) result. | ||
| The output should include "AKS_GPU_PREBAKE event=teardown" | ||
| The output should include "status=incomplete" | ||
| End | ||
|
|
||
| It 'reports status=cleaned once the marker and DKMS state are actually gone' | ||
| marker="$(mktemp)" | ||
| GPU_DKMS_MARKER_FILE="${marker}" | ||
| ldconfig() { echo "mock ldconfig"; } | ||
| When call cleanUpPrebakedGPUDriver | ||
| The status should be success | ||
| The output should include "AKS_GPU_PREBAKE event=teardown" | ||
| The output should include "status=cleaned" | ||
| The output should include "marker_after=false" | ||
| End | ||
| End | ||
| End | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.