-
Notifications
You must be signed in to change notification settings - Fork 18.8k
daemon: Discover devices and include in system info #49980
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
Conversation
b4cb42c
to
aa737a3
Compare
aa737a3
to
50d3900
Compare
api/types/system/info.go
Outdated
// Name is the unique identifier for the device. | ||
// Example: CDI FQDN like "vendor.com/gpu=0", or other driver-specific device ID | ||
Name string `json:"Name"` |
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.
Hmmm, on a second look, Name
is probably too CDI-centric.
Perhaps ID
would make more sense here to keep consistency with the actual DeviceRequest
struct we use in our API.
moby/api/types/container/hostconfig.go
Line 263 in 2154b9c
DeviceIDs []string // List of device IDs as recognizable by the device driver |
@thaJeztah @tonistiigi WDYT?
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.
ok with calling it smth else. It should have the value that I can use in --device
. Doesn't Source
make more sense as Type
?
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.
Source
is the name of the device driver that discovered the device though. So that would be a cdi
or nvidia
. I think calling it Type
would be more ambiguous?
50d3900
to
08b40cb
Compare
Changed |
@@ -3,7 +3,7 @@ package api // import "github.com/docker/docker/api" | |||
// Common constants for daemon and client. | |||
const ( | |||
// DefaultVersion of the current REST API. | |||
DefaultVersion = "1.49" | |||
DefaultVersion = "1.50" |
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.
We also need to update versions mentioned in the swagger file, e.g.
Lines 58 to 60 in c04dec1
If you omit the version-prefix, the current version of the API (v1.49) is used. | |
For example, calling `/info` is the same as calling `/v1.49/info`. Using the | |
API without a version-prefix is deprecated and will be removed in a future release. |
"cleanest" would be to to both that, as well as the version-history.md in a single commit, like 4390ab2
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.
Done, thanks!
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.
code changes LGTM
left a comment for the API version bump (and missing bump in swagger)
Logger was created but no consumed. Signed-off-by: Paweł Gronowski <[email protected]>
Prevent the daemon spawned for integration tests from sourcing the daemon configuration intended interactive dev shell usage. Before this change, integration tests would fail to create a daemon with different configuration provided via cli flags (like `--feature`) if they're already specified in the default daemon.json. Signed-off-by: Paweł Gronowski <[email protected]>
Signed-off-by: Paweł Gronowski <[email protected]>
Add ability for the device driver to implement a device discovery mechanism and expose discovered devices in the `docker info` output. Currently it's only implemented for CDI devices. Signed-off-by: Paweł Gronowski <[email protected]>
Signed-off-by: Paweł Gronowski <[email protected]>
08b40cb
to
c1b2be0
Compare
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
Add ability for the device driver to implement a device discovery mechanism and expose discovered devices in the
docker info
output.Currently it's only implemented for CDI devices.
- How to verify it
New tests
Example
/info
output:- Human readable description for the release notes
TODO: Make CLI print it (
docker info
now returnsDiscoveredDevices
providing a result of CDI device discovery.)