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

fix (localpv): CSIStorageClass shows zero if SC "poolname" includes dataset path #393

Merged
merged 3 commits into from
Oct 5, 2021

Conversation

netom
Copy link
Contributor

@netom netom commented Oct 2, 2021

Signed-off-by: Fábián Tamás László giganetom@gmail.com

Why is this PR required? What issue does it fix?:

It fixes #392 "GetCapacity reports zero when using non-root dataset"

What this PR does?:

Amends pkg/driver/controller.go to return the root dataset's capacity when using a child dataset as the pool name.

I'm aware that this is not the ideal solution, as the child dataset may offer less capacitry than the whole pool, but this is most definitely better than returning a straigh zero like it's now.

The situation could further be improved if the Node could return the capacity of a child dataset.

Does this PR require any upgrade changes?:

No, this is just a simple fix in the capacity calculation.

If the changes in this PR are manually verified, list down the scenarios covered::

I've manually verified that the storage capacity returns the pool's capacity when a child dataset is used, and also when the "poolname" is really just the pool's name.

Any additional information for your reviewer? :

This is just a small, standalone fix, not part of anything greater.

Copy link
Contributor

@pawanpraka1 pawanpraka1 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. Have given some minor comments. Thanks for this PR @netom.

pkg/driver/controller.go Outdated Show resolved Hide resolved
pkg/driver/controller.go Outdated Show resolved Hide resolved
Signed-off-by: Fábián Tamás László <giganetom@gmail.com>
Signed-off-by: Fábián Tamás László <giganetom@gmail.com>
Signed-off-by: Fábián Tamás László <giganetom@gmail.com>
Copy link
Contributor

@pawanpraka1 pawanpraka1 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.

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.

GetCapacity reports zero when using non-root dataset
2 participants