Skip to content

Fix Resize call to return size in Gi as expected when disk is already the request size or larger #462

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

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

davidz627
Copy link
Contributor

/kind bug
/kind failing-test
/assign @msau42 @gnufied

Fixes #433

Fixed bug where ControllerExpandVolume was returning incorrect size when disk was already the requested size or larger

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 4, 2020
@k8s-ci-robot k8s-ci-robot added kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 4, 2020
@k8s-ci-robot
Copy link
Contributor

@davidz627: GitHub didn't allow me to assign the following users: gnufied.

Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/kind bug
/kind failing-test
/assign @msau42 @gnufied

Fixes #433

Fixed bug where ControllerExpandVolume was returning incorrect size when disk was already the requested size or larger

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 4, 2020
@davidz627
Copy link
Contributor Author

Also the error logs were totally incorrect so I just fixed that as I was going

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidz627

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 4, 2020
if sizeGb >= requestGb {
return requestBytes, nil
return sizeGb, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

@gnufied also identified this as one of the problematic driver responses to resize. We should be returning the actual size, not the requested size.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nm it's too early in the morning to read properly :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a unit test for this case that verifies we return actual size instead of request?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's really hard to unit test this package right now as there was no easy way to fake out the actual cloud provider layer. So this "is" the cloud provider layer that I hacked together that we use as an interface to fake out. Suggestions welcome. It's in the backlog to switch over to the autogenerated cloud provider client layer that we switched over to in Kubernetes a while back - that provided the ability to fake out calls and unit test these types of things effectively.

@msau42
Copy link
Contributor

msau42 commented Feb 4, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 4, 2020
@k8s-ci-robot k8s-ci-robot merged commit afd7d61 into kubernetes-sigs:master Feb 4, 2020
@davidz627 davidz627 deleted the fix/flow branch February 4, 2020 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in NodeExpandVolume
3 participants