Skip to content

Conversation

@michaelgugino
Copy link
Contributor

This is needed for BYO team to have 0 worker replicas.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 20, 2018
@staebler
Copy link
Contributor

Wouldn't it be better to get rid of the validation that requires the worker machine pool?

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why this is necessary of all a sudden. It worked fine in v0.6.0. Does not work in v0.7.0-master or master.

Copy link
Contributor

Choose a reason for hiding this comment

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

Validation was added in v0.7.0.

@staebler
Copy link
Contributor

This will make it valid to set a replica size of 0 for the master machine pool as well. I don't think we want that.

@michaelgugino
Copy link
Contributor Author

This will make it valid to set a replica size of 0 for the master machine pool as well. I don't think we want that.

@staebler I can make it check just masters if you prefer.

@staebler
Copy link
Contributor

This will make it valid to set a replica size of 0 for the master machine pool as well. I don't think we want that.

@staebler I can make it check just masters if you prefer.

@michaelgugino My preference is to remove the requirement for the "worker" machine pool. Is there a reason to keep that machine pool with a replica size of 0 instead of omitting that machine pool?

@michaelgugino
Copy link
Contributor Author

This will make it valid to set a replica size of 0 for the master machine pool as well. I don't think we want that.

@staebler I can make it check just masters if you prefer.

@michaelgugino My preference is to remove the requirement for the "worker" machine pool. Is there a reason to keep that machine pool with a replica size of 0 instead of omitting that machine pool?

@staebler

Aside from the fact that there are other validations in place expect that to be present? No, I don't think we need it to be present at all, but that would be a bigger patch set. Keeping it also would result in the machineset being created, which might be desired for scaling later in other usecases, of which I don't have a compelling example ATM.

While we could exclude workers, I think it makes more sense to specifically include masters. I think in all likelihood there will be an expectation to have arbitrary machinesets in the future, but it makes no difference to me.

Let me know what you prefer, I think the simplest fix is the best here, I just need it to not fail when I want to create ignition configs with 0 workers.

@staebler
Copy link
Contributor

This will make it valid to set a replica size of 0 for the master machine pool as well. I don't think we want that.

@staebler I can make it check just masters if you prefer.

@michaelgugino My preference is to remove the requirement for the "worker" machine pool. Is there a reason to keep that machine pool with a replica size of 0 instead of omitting that machine pool?

@staebler

Aside from the fact that there are other validations in place expect that to be present? No, I don't think we need it to be present at all, but that would be a bigger patch set. Keeping it also would result in the machineset being created, which might be desired for scaling later in other usecases, of which I don't have a compelling example ATM.

While we could exclude workers, I think it makes more sense to specifically include masters. I think in all likelihood there will be an expectation to have arbitrary machinesets in the future, but it makes no difference to me.

Let me know what you prefer, I think the simplest fix is the best here, I just need it to not fail when I want to create ignition configs with 0 workers.

We can do either, especially for the short term. I think changing the validation to remove the "worker" requirement is easy, too. Delete these 3 lines.

if !poolNames["worker"] {
allErrs = append(allErrs, field.Required(fldPath, "must specify a machine pool with a name of 'worker'"))
}

@staebler
Copy link
Contributor

@michaelgugino Whichever you prefer to do in the short term, I will lgtm to get BYO unblocked on this.

@michaelgugino michaelgugino force-pushed the min-replicas-0 branch 2 times, most recently from 8666e74 to eb55931 Compare January 4, 2019 14:57
This commit is needed to allow 0 replicas for workers which is
necessary for the BYO usecase.
@michaelgugino
Copy link
Contributor Author

@staebler ptal

@openshift-ci-robot
Copy link
Contributor

@michaelgugino: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws 36bc20a link /test e2e-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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.

@sdodson
Copy link
Member

sdodson commented Jan 4, 2019

/cc @wking @abhinavdahiya
/approve
PTAL

lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: michaelgugino, sdodson
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: wking

If they are not already assigned, you can assign the PR to them by writing /assign @wking in a comment when ready.

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

The pull request process is described here

Details 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

@crawford
Copy link
Contributor

crawford commented Jan 4, 2019

@michaelgugino I ran into this recently as well. I think I'd prefer @staebler's suggestion of removing the need for the worker machine pool. Do you have time to take another pass at this? If not, I'll eventually pick it up.

@michaelgugino
Copy link
Contributor Author

@michaelgugino I ran into this recently as well. I think I'd prefer @staebler's suggestion of removing the need for the worker machine pool. Do you have time to take another pass at this? If not, I'll eventually pick it up.

@crawford I think that would still require this patch set. While the workers could indeed not be defined, if they are defined and set to zero, we'd still hit the same error. IMO, allowing for zero makes more sense as it's easier to template.

wking added a commit to wking/openshift-installer that referenced this pull request Jan 29, 2019
We don't currently support configuring zero workers [1], largely
because some key operators still do not tolerate masters.  Still, some
users are attempting to work around our checks by leaving 'replicas'
unset (which ends up as nil in Go) [2].  This commit adjusts our
install-config defaulting to fill in the default replica counts when
the user provides machine-pool entries but leaves replicas unset.

[1]: openshift#958
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1670005#c1
@wking
Copy link
Member

wking commented Jan 30, 2019

@crawford
Copy link
Contributor

Superseded by #1231.

@openshift-ci-robot
Copy link
Contributor

@crawford: Closed this PR.

Details

In response to this:

Superseded by #1231.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants