info: report configured and discovered CDI devices#28712
Conversation
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Add CDI information to podman info and podman system info. The host info now includes the configured CDI spec directories and the currently discovered CDI devices. The devices are resolved when the info endpoint is called and there is no need to refresh these in the background. Also map the same data into the Docker-compatible /info response as CDISpecDirs and DiscoveredDevices. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Honny1
left a comment
There was a problem hiding this comment.
LGTM, Thanks!
@podman-container-tools/podman-maintainers PTAL
| } | ||
| EOF | ||
|
|
||
| run_podman --cdi-spec-dir "$cdi_dir" info --format=json |
There was a problem hiding this comment.
is this not essentially the same test as in e2e except that this one uses --cdi-spec-dir while the e2e one uses the config file?
personally I like to avoid test duplication between the two as it just adds unnecessary CI time, our tests are already slow
Feels like it would be simpler to just add this into the e2e test?
There was a problem hiding this comment.
Yes, this change is probably not strictly required since we're not checking anything other than the json content reported by the info command.
My one naive question would be how this is different to the other tests that are also added here?
(Happy to remove this if you feel strongly about it though).
There was a problem hiding this comment.
Also, I don't think the --cdi-spec-dir flag is in common use, and if I recall correctly it was mainly added for testing flexibility.
Add CDI information to podman info and podman system info.
The host info now includes the configured CDI spec directories and the currently discovered CDI devices. The devices are resolved when the info endpoint is called and there is no need to refresh these in the background.
Also map the same data into the Docker-compatible /info response as CDISpecDirs and DiscoveredDevices.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?