Skip to content
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

NAS-132131 / 25.04 / Add docker nvidia status #10983

Merged
merged 5 commits into from
Nov 8, 2024
Merged

Conversation

denysbutenko
Copy link
Member

@denysbutenko denysbutenko commented Nov 5, 2024

Changes:

Add support for docker.nvidia_status endpoint

Testing:

Check the Apps page and settings.

@denysbutenko denysbutenko requested a review from a team as a code owner November 5, 2024 17:55
@denysbutenko denysbutenko requested review from undsoft and removed request for a team November 5, 2024 17:55
@bugclerk bugclerk changed the title NAS-132131: Add docker nvidia status NAS-132131 / 25.04 / Add docker nvidia status Nov 5, 2024
@bugclerk
Copy link
Contributor

bugclerk commented Nov 5, 2024

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.91%. Comparing base (c55654b) to head (118ca72).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10983   +/-   ##
=======================================
  Coverage   81.91%   81.91%           
=======================================
  Files        1613     1614    +1     
  Lines       56861    56877   +16     
  Branches     5886     5887    +1     
=======================================
+ Hits        46577    46593   +16     
  Misses      10284    10284           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@undsoft undsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Middleware behavior doesn't match my expectations.
On a CI machine, the initial status is NOT_INSTALLED, when I install drivers it becomes ABSENT.
Shouldn't it be the other way around, @themylogin?

@@ -38,7 +39,8 @@ export class DockerStore extends ComponentStore<DockerConfigState> {
readonly dockerConfig$ = this.select((state) => state.dockerConfig);
readonly selectedPool$ = this.select((state) => state.dockerConfig?.pool || null);
readonly nvidiaDriversInstalled$ = this.select((state) => state.nvidiaDriversInstalled);
readonly lacksNvidiaDrivers$ = this.select((state) => state.lacksNvidiaDrivers);
readonly lacksNvidiaDrivers$ = this.select((state) => state.nvidiaStatus !== DockerNvidiaStatus.Absent);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think name matches the condition.

@undsoft undsoft added the blocked label Nov 6, 2024
@themylogin
Copy link
Contributor

@undsoft you are correct, fixed truenas/middleware#14872

@denysbutenko
Copy link
Member Author

@undsoft now it returns ABSENT on nightlies and this checkbox never appears.

For testing:

midclt call test.remove_mock docker.nvidia_status '[]'
midclt call test.set_mock docker.nvidia_status '[]' '{"return_value": {"status":"NOT_INSTALLED"}}'
midclt call docker.nvidia_status

Copy link
Collaborator

@undsoft undsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@themylogin Please note that it's possible to have a mismatch beween nvidia property in docker.config and docker.nvidia_status. If you force driver installation on a system that doesn't have nvidia cards, the former will return true, while the latter returns ABSENT.
This is fine (good actually) for purposes of UI behavior, but if you fix it in the future, UI may behave unexpectedly.

# Conflicts:
#	src/assets/i18n/es-ar.json
#	src/assets/i18n/fr.json
#	src/assets/i18n/zh-hans.json
@denysbutenko denysbutenko merged commit 8962217 into master Nov 8, 2024
13 checks passed
@denysbutenko denysbutenko deleted the NAS-132131 branch November 8, 2024 07:31
@bugclerk
Copy link
Contributor

bugclerk commented Nov 8, 2024

JIRA ticket https://ixsystems.atlassian.net/browse/NAS-132131 is targeted to the following versions which have not received their corresponding PRs: 24.10.1

@bugclerk
Copy link
Contributor

bugclerk commented Nov 8, 2024

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Nov 8, 2024
@denysbutenko
Copy link
Member Author

backport

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants