daemon: Discover devices and include in system info #49980
daemon: Discover devices and include in system info #49980vvoland merged 5 commits intomoby:masterfrom
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.
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
@thaJeztah @tonistiigi WDYT?
There was a problem hiding this comment.
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.
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 |
| const ( | ||
| // DefaultVersion of the current REST API. | ||
| DefaultVersion = "1.49" | ||
| DefaultVersion = "1.50" |
thaJeztah
left a comment
There was a problem hiding this comment.
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 <pawel.gronowski@docker.com>
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 <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
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 <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
08b40cb to
c1b2be0
Compare
Add ability for the device driver to implement a device discovery mechanism and expose discovered devices in the
docker infooutput.Currently it's only implemented for CDI devices.
- How to verify it
New tests
Example
/infooutput:- Human readable description for the release notes
TODO: Make CLI print it (
docker infonow returnsDiscoveredDevicesproviding a result of CDI device discovery.)