-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OCPBUGS-64793: Infrastructure Topology calculation is wrong #10077
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
base: main
Are you sure you want to change the base?
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 | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,6 +28,11 @@ func determineTopologies(installConfig *types.InstallConfig) (controlPlaneTopolo | |||||||||||||||||||
| for _, mp := range installConfig.Compute { | ||||||||||||||||||||
| numOfWorkers += ptr.Deref(mp.Replicas, 0) | ||||||||||||||||||||
| } | ||||||||||||||||||||
| if numOfWorkers < 2 { | ||||||||||||||||||||
| // Control planes are schedulable when there are < 2 workers. | ||||||||||||||||||||
| // Adjust the number of schedulable nodes here to reflect. | ||||||||||||||||||||
| numOfWorkers += controlPlaneReplicas | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| switch numOfWorkers { | ||||||||||||||||||||
| case 0: | ||||||||||||||||||||
|
Comment on lines
+31
to
38
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. By adding this check, the installer/pkg/asset/manifests/topologies.go Lines 33 to 41 in 4180662
IIUC, it is OK. When using deploying 2-node or arbiter cluster, the infrastructure topology should /cc @eggfoobar @jaypoulz
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. I think this change is effectively applying the same rules that we use for 2-node/arbiter case to everything. So it's valid, but the comments and code below that suggest there's still a special case that applies only to 2-node/arbiter clusters is now misleading. Better to delete it I think. |
||||||||||||||||||||
|
|
||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
When there is a single control-plane node and 0 compute nodes, we should end up with
controlPlaneTopology==configv1.SingleReplicaTopologyModeandinfrastructureTopology==configv1.SingleReplicaTopologyMode. I don't see a test for that.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.
https://github.com/openshift/installer/blob/main/pkg/asset/manifests/topologies_test.go#L31 This test should take care of that.
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.
Thanks!