-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for CDI device configuration #10081
Conversation
cfa0a39
to
288197b
Compare
ea52be6
to
bc07c5b
Compare
The CI won't be happy until you add a test. |
Needs a rebase. |
@TomSweeneyRedHat Ack, saw that thanks. Rebased & test added. |
1378767
to
f015d7f
Compare
for _, device := range s.Devices { | ||
isCDIDevice, err := cdi.HasDevice(device.Path) | ||
if err != nil { | ||
// do nothing |
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.
should we at least log the error (warning or debug level)?
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.
This "error" will occur whenever the --device
passed is not a CDI device.
Agreed it's worth logging somewhere, added.
if err != nil { | ||
// do nothing | ||
} | ||
if isCDIDevice { |
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.
in case of errors, what is the value for isCDIDevice?
Would it be safer to use if err == nil && isCDIDevice
?
- Persist CDIDevices in container config - Add e2e test - Log HasDevice error and add additional condition for safety Signed-off-by: Sebastian Jug <[email protected]>
@RenaudWasTaken PTAL |
|
||
for _, device := range s.Devices { | ||
isCDIDevice, err := cdi.HasDevice(device.Path) | ||
if err != nil { |
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.
Should we bubble an error up the stack here?
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.
lgtm, one minor nit
cc @umohnani8 |
LGTM |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RenaudWasTaken, sjug, umohnani8 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Thanks to Renaud from Nvidia.