-
Notifications
You must be signed in to change notification settings - Fork 472
Add fabric manager configuration support #2045
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
Open
mresvanis
wants to merge
8
commits into
NVIDIA:main
Choose a base branch
from
mresvanis:fabric-manager-configuration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8337157
Add Fabric Manager configuration API types and CRD manifests
mresvanis abaeb18
Implement controller support for Fabric Manager configuration when vm…
mresvanis 3c669cd
Adjust driver startup probe for vm-passthrough with shared NVSwitch mode
mresvanis 6287721
Add FM env var to driver container when shared-nvswitch
mresvanis f2e8b45
Support vfio-manager with shared-nvswitch fabric manager mode
mresvanis d0682bf
Add wait for vfio-pci sandbox validation
mresvanis ebae606
Add driver validation in sandbox when FM shared-nvswitch mode
mresvanis 9b54339
Enable FM in sandbox device plugin when FM shared-nvswitch mode
mresvanis 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,10 @@ rules: | |
| - use | ||
| resourceNames: | ||
| - privileged | ||
| - apiGroups: | ||
| - apps | ||
| resources: | ||
| - daemonsets | ||
| verbs: | ||
| - get | ||
| - list | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: nvidia-vfio-manager-entrypoint | ||
| namespace: "FILLED BY THE OPERATOR" | ||
| labels: | ||
| app: nvidia-vfio-manager | ||
| data: | ||
| init-entrypoint.sh: |- | ||
| #!/bin/sh | ||
|
|
||
| if [ "${FABRIC_MANAGER_MODE}" = "shared-nvswitch" ]; then | ||
| # In shared-nvswitch mode, wait for driver to be ready before unbinding devices | ||
| echo "Shared NVSwitch mode detected, waiting for driver readiness..." | ||
| until [ -f /run/nvidia/validations/driver-ready ] | ||
| do | ||
| echo "waiting for the driver validations to be ready..." | ||
| sleep 5 | ||
| done | ||
|
|
||
| set -o allexport | ||
| cat /run/nvidia/validations/driver-ready | ||
| . /run/nvidia/validations/driver-ready | ||
|
|
||
| echo "Driver is ready, proceeding with device unbind" | ||
| exec vfio-manage unbind --all | ||
| else | ||
| # Default mode: uninstall the driver | ||
| exec driver-manager uninstall_driver | ||
| fi |
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
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.
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.
Question (for my understanding) -- GPUs may not be bound to the
nvidiadriver since there is a chance that thevfio-managerran already and unbound the devices? Am I understanding this correct?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.
Yes, that's correct. In
shared-nvswitchmode, thevfio-managerrunsvfio-manage unbind --allto unbind GPUs from the nvidia driver and rebind them tovfio-pcifor VM passthrough. The nvidia kernel module remains loaded (needed for Fabric Manager / NVSwitch management), but since the GPU devices are no longer bound to the nvidia drivernvidia-smifails. So we fall back to just verifying the kernel module is loaded, which is sufficient for this mode.