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

lxc: Show storage volume info regardless of state #12030

Merged

Conversation

monstermunchkin
Copy link
Contributor

@monstermunchkin monstermunchkin commented Jul 17, 2023

This fixes an issue where no storage volume info would be displayed if
state returned HTTP 500. Instead, the usage should be omitted.

Signed-off-by: Thomas Hipp thomas.hipp@canonical.com

Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

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

We should return -1 on the values, as 0 could be a genuine value. Also we should only do this if the storage pool returns a specific not implemented error.

@monstermunchkin
Copy link
Contributor Author

monstermunchkin commented Jul 18, 2023

@tomponline we could also just drop it entirely in case of an error.

@tomponline
Copy link
Member

What do you mean "drop it"? Ta

@monstermunchkin
Copy link
Contributor Author

What do you mean "drop it"? Ta

Sorry, what I meant was not showing the usage at all, e.g.:

$ lxc storage volume info default vol1
Name: vol1
Type: custom
Content type: filesystem
Created: 2023/07/17 15:07 CEST

@tomponline
Copy link
Member

@monstermunchkin yeah that would work

This fixes an issue where no storage volume info would be displayed if
state returned HTTP 500. Instead, the usage should be omitted.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
@tomponline tomponline merged commit e8988ee into canonical:main Jul 18, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants