-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
OSASINFRA-2571: Add quota validation for server group #9326
Conversation
@dkokkino: No Jira issue with key OSAINFRA-2571 exists in the tracker at https://issues.redhat.com/. In response to this: 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 openshift-eng/jira-lifecycle-plugin repository. |
Skipping CI for Draft Pull Request. |
/retitle OSASINFRA-2571: Add quota validation for server group |
@dkokkino: This pull request references OSASINFRA-2571 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. In response to this: 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 openshift-eng/jira-lifecycle-plugin repository. |
@dkokkino Great work! |
0feda0f
to
5bc0e7e
Compare
/test e2e-openstack-proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nit and a question inline. Looking good otherwise.
@@ -53,6 +53,13 @@ func Constraints(ci *validation.CloudInfo, controlPlanes []machineapi.Machine, c | |||
if len(ci.ControlPlanePortSubnets) == 0 { | |||
constraints = append(constraints, networkConstraint(1), routerConstraint(1), subnetConstraint(1)) | |||
} | |||
// if the cluster does not have worker nodes then reduce the server group value from 2 to 1 | |||
numServerGroups := int64(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to wrap in int64
rather than just using "raw" values? I'm guessing this is consistency, but it'd be nice to know why we did it in the first place 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, the number of workers is int64 in install-config. The rest of the numbers can be automatic int
s I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this is still int64. Was it not possible to use int
?
|
||
func serverGroupsConstraint(count int64) quota.Constraint { | ||
return generateConstraint("ServerGroups", count) | ||
} | ||
|
||
func serverGroupMembersConstraint(count int64) quota.Constraint { | ||
return generateConstraint("ServerGroupMembers", count) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we gather these with the other compute-related constraints? You could move these up to line 150.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay i have grouped the constraints.
- Added a quota constraint for server groups with a default of 2, reducing to 1 when no worker nodes are provisioned. - Added a quota constraint for server group members, equal to the number of instances provisioned.
5bc0e7e
to
e7187d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retest |
/test e2e-openstack-ovn |
/test e2e-openstack-proxy |
/approve Passing all jobs now. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: stephenfin 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 |
/label acknowledge-critical-fixes-only |
@dkokkino: The following test failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
44b681d
into
openshift:main
[ART PR BUILD NOTIFIER] Distgit: ose-installer-altinfra |
[ART PR BUILD NOTIFIER] Distgit: ose-baremetal-installer |
[ART PR BUILD NOTIFIER] Distgit: ose-installer-terraform-providers |
[ART PR BUILD NOTIFIER] Distgit: ose-installer-artifacts |
No description provided.