Skip to content

Conversation

@rphillips
Copy link
Contributor

@rphillips rphillips commented Jun 27, 2025

Some master nodes from very old clusters do not have the node-role.kubernetes.io/control-plane label. This PR changes the logic of reconcileMaster. It seems like a great spot to add the control-plane label if it was not set.

@sdodson
Copy link
Member

sdodson commented Jun 27, 2025

/approve

@sdodson sdodson added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 27, 2025
if _, hasWorkerLabel := newLabels[WorkerLabel]; !hasWorkerLabel {
newLabels[WorkerLabel] = ""
}
// Legacy clusters do not have the node-role.kubernetes.io/control-plane
Copy link
Contributor

Choose a reason for hiding this comment

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

the makeMasterNodeSchedulable seems to be called for clusters where the control plane nodes acts as workers. So for most of the clusters, I don't think it would even hit this logic?

Maybe we can lift this up to reconcileMaster() instead and have it check every time it re-checks the control plane nodes?

Copy link
Contributor Author

@rphillips rphillips Jun 27, 2025

Choose a reason for hiding this comment

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

Very good point. Though, reconcileMaster() does not do a Node().Update() call. The callers of reconcileMaster() do not seem to update the Node either.

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 have an idea on a patch. I'll update this PR.

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 updated the PR to add the logic in reconcileMaster() and perform the update.

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

/lgtm

Would you like to attach a jira to this

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rphillips, sdodson, yuqi-zhang

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

@rphillips rphillips changed the title Add control-plane label for master nodes on legacy clusters OCPBUGS-58180: Add control-plane label for master nodes on legacy clusters Jun 27, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jun 27, 2025
@openshift-ci-robot
Copy link
Contributor

@rphillips: This pull request references Jira Issue OCPBUGS-58180, which is invalid:

  • expected the bug to target the "4.20.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Some master nodes from very old clusters do not have the node-role.kubernetes.io/control-plane label. This PR changes the logic of makeMasterNodeSchedulable. The MCO in this code path is already changing the labels and taints, and bringing the node back online as scheduable. It seems like a great spot to add the control-plane label if it was not set.

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.

@rphillips
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jun 27, 2025
@openshift-ci-robot
Copy link
Contributor

@rphillips: This pull request references Jira Issue OCPBUGS-58180, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @sergiordlr

In response to this:

/jira refresh

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.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Jun 27, 2025
@openshift-ci openshift-ci bot requested a review from sergiordlr June 27, 2025 21:55
@openshift-merge-bot openshift-merge-bot bot merged commit a08d5ec into openshift:main Jun 28, 2025
15 of 19 checks passed
@openshift-ci-robot
Copy link
Contributor

@rphillips: Jira Issue OCPBUGS-58180: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-58180 has been moved to the MODIFIED state.

In response to this:

Some master nodes from very old clusters do not have the node-role.kubernetes.io/control-plane label. This PR changes the logic of makeMasterNodeSchedulable. The MCO in this code path is already changing the labels and taints, and bringing the node back online as scheduable. It seems like a great spot to add the control-plane label if it was not set.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2025

@rphillips: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-op-techpreview db096c0 link false /test e2e-gcp-op-techpreview
ci/prow/okd-scos-e2e-aws-ovn db096c0 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-gcp-op-ocl db096c0 link false /test e2e-gcp-op-ocl

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.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-machine-config-operator
This PR has been included in build ose-machine-config-operator-container-v4.20.0-202506280312.p0.ga08d5ec.assembly.stream.el9.
All builds following this will include this PR.

@openshift-ci-robot
Copy link
Contributor

@rphillips: Jira Issue OCPBUGS-58180 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state.

In response to this:

Some master nodes from very old clusters do not have the node-role.kubernetes.io/control-plane label. This PR changes the logic of reconcileMaster. It seems like a great spot to add the control-plane label if it was not set.

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.

@sdodson
Copy link
Member

sdodson commented Jul 8, 2025

/cherry-pick release-4.19

@openshift-cherrypick-robot

@sdodson: new pull request created: #5168

In response to this:

/cherry-pick release-4.19

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.

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants