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

Bug 1906459: openstack: fix quota checks when they're unlimited #4470

Merged
merged 1 commit into from Dec 11, 2020

Conversation

EmilienM
Copy link
Member

@EmilienM EmilienM commented Dec 10, 2020

In OpenStack, if a quota resource is limited to "-1", it means that it's
unlimited. It's the case of a lot of OpenStack clouds, were quotas
aren't defined for all projects and by default "-1" is used.

This patch will ignore a quota record if its limit is set to "-1".

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1906459
Signed-off-by: Emilien Macchi emilien@redhat.com

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Dec 10, 2020
@openshift-ci-robot
Copy link
Contributor

@EmilienM: This pull request references Bugzilla bug 1906459, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1906459: openstack: fix quota checks when they're unlimited

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.

@openshift-ci-robot
Copy link
Contributor

@EmilienM: This pull request references Bugzilla bug 1906459, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1906459: openstack: fix quota checks when they're unlimited

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.

@EmilienM
Copy link
Member Author

/label platform/openstack
/assign EmilienM
/cc pierreprinetti mandre mdbooth staebler

Copy link
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

I've tested and it fixes the issue. Is there unit test coverage somewhere we can add this case to?

Copy link
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks for the quick fix.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 10, 2020
@EmilienM
Copy link
Member Author

I've tested and it fixes the issue. Is there unit test coverage somewhere we can add this case to?

no unit tests for cloudinfo nor quotas but I agree it would be nice to have at some point.

@EmilienM
Copy link
Member Author

/retest

@EmilienM
Copy link
Member Author

/test e2e-crc

1 similar comment
@EmilienM
Copy link
Member Author

/test e2e-crc

@mandre
Copy link
Member

mandre commented Dec 11, 2020

/assign @staebler
We need your approval for the pkg/quota/quota.go change, PTAL.

pkg/quota/quota.go Outdated Show resolved Hide resolved
In OpenStack, if a quota resource is limited to "-1", it means that it's
unlimited. It's the case of a lot of OpenStack clouds, were quotas
aren't defined for all projects and by default "-1" is used.

This patch will ignore a quota record if its limit is set to "-1".

Note: it adds "Unlimited" to the Quota struct, as a boolean, so later
any platform can set it to true if a resource is unlimited.

Signed-off-by: Emilien Macchi <emilien@redhat.com>
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2020
@iamemilio
Copy link

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2020
Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: staebler

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 11, 2020
@openshift-merge-robot
Copy link
Contributor

@EmilienM: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-crc ce2a61e link /test e2e-crc
ci/prow/e2e-aws-workers-rhel7 260643b link /test e2e-aws-workers-rhel7

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit de2d699 into openshift:master Dec 11, 2020
@openshift-ci-robot
Copy link
Contributor

@EmilienM: All pull requests linked via external trackers have merged:

Bugzilla bug 1906459 has been moved to the MODIFIED state.

In response to this:

Bug 1906459: openstack: fix quota checks when they're unlimited

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.

@EmilienM EmilienM deleted the unlimited/quotas branch December 11, 2020 22:18
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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. platform/openstack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants