-
Notifications
You must be signed in to change notification settings - Fork 1.5k
scheduler: Use schedulable masters if no compute hosts defined. #2004
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,6 @@ import ( | |
|
|
||
| dockerref "github.com/containers/image/docker/reference" | ||
| "github.com/pkg/errors" | ||
| "github.com/sirupsen/logrus" | ||
| "k8s.io/apimachinery/pkg/util/validation/field" | ||
|
|
||
| "github.com/openshift/installer/pkg/types" | ||
|
|
@@ -183,7 +182,6 @@ func validateControlPlane(platform *types.Platform, pool *types.MachinePool, fld | |
| func validateCompute(platform *types.Platform, pools []types.MachinePool, fldPath *field.Path) field.ErrorList { | ||
| allErrs := field.ErrorList{} | ||
| poolNames := map[string]bool{} | ||
| foundPositiveReplicas := false | ||
| for i, p := range pools { | ||
| poolFldPath := fldPath.Index(i) | ||
| if p.Name != "worker" { | ||
|
|
@@ -193,14 +191,8 @@ func validateCompute(platform *types.Platform, pools []types.MachinePool, fldPat | |
| allErrs = append(allErrs, field.Duplicate(poolFldPath.Child("name"), p.Name)) | ||
| } | ||
| poolNames[p.Name] = true | ||
| if p.Replicas != nil && *p.Replicas > 0 { | ||
| foundPositiveReplicas = true | ||
| } | ||
| allErrs = append(allErrs, ValidateMachinePool(platform, &p, poolFldPath)...) | ||
| } | ||
| if !foundPositiveReplicas { | ||
| logrus.Warnf("There are no compute nodes specified. The cluster will not fully initialize without compute nodes.") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we really remove this warning? Does this PR allow the ingress scheduler to be scheduled on control plane nodes (e.g. see here and kubernetes/kubernetes#65618)? Are we running CI on zero-compute clusters?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, when you set schedulableMasters to true, the worker role gets added to the master nodes, as well. nothing in OpenShift CI for this yet
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On cloud platforms, while adding a worker role to masters will allow ingress controllers to be scheduled on the masters, the master nodes will remain excluded from load balancer target pools, breaking the practical feature. As to whether Kube will support including masters in LB target pools, the jury is still out and there is still no KEP AFAICT. kubernetes/kubernetes#65618
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @russelb, can you restore the warning?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, with a single compute, we won't trigger this schedulable-control-plane logic, so won't ingress hang with "I can't get replicas up to two"?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The warning wouldn't be appropriate for a 3-node bare metal cluster. I guess it could be restored and only emitted if the platform type is not |
||
| } | ||
| return allErrs | ||
| } | ||
|
|
||
|
|
||
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.
The trade-off here I guess is between:
I would imagine that in the case of (2) we might find users just leave masters as schedulable even after they add workers?
IMO it's important enough for us to understand the intent that we should add the install-config option