Skip to content

Conversation

@razo7
Copy link
Member

@razo7 razo7 commented Jan 11, 2026

Why we need this PR

This is a leftover from early k8s days when taints and tolerations didn’t exist yet. It only still exists because removing it would be a node API change. The scheduler only looks at taints, and more info is at kubernetes/kubernetes#69010

Changes made

  • Remove the logic for marking the node as unscheduleable by updating the spec
  • Update Unit-tests accordingly and avoid testing the node spec.unscheduleable value

Which issue(s) this PR fixes

RHWA-571

Test plan

Summary by CodeRabbit

  • Refactor
    • Simplified node remediation workflow by removing unschedulable state handling, now relying exclusively on NoExecute and OutOfService taint mechanisms for node remediation and recovery operations.

✏️ Tip: You can customize this high-level summary in your review settings.

This is a leftover from early k8s days when taints and tolerations didn’t exist yet. It only still exists because removing it would be a node API change. The scheduler only looks at taints and more info is at kubernetes/kubernetes#69010
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 11, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 11, 2026

📝 Walkthrough

Walkthrough

The changes remove unschedulable taint handling from the self-node remediation controller. Constants, event reasons, and taint-related functions are deleted, and logic in prepareReboot and recoverNode that managed node schedulability is removed. Test utilities and assertions related to unschedulable taints are also eliminated.

Changes

Cohort / File(s) Summary
Unschedulable taint removal
controllers/selfnoderemediation_controller.go
Removed constants eventReasonMarkUnschedulable, eventReasonMarkSchedulable, exported variable NodeUnschedulableTaint, and function markNodeAsUnschedulable. Removed conditional branches in prepareReboot and recoverNode that handled unschedulable state transitions and taint management.
Test cleanup
controllers/tests/controller/selfnoderemediation_controller_test.go
Removed helper functions addUnschedulableTaint, removeUnschedulableTaint, verifyNodeIsUnschedulable, and verifyNodeIsSchedulable. Removed test assertions and event checks for MarkUnschedulable and MarkNodeSchedulable events. Simplified test flows to remove unschedulable taint verification.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

lgtm

Suggested reviewers

  • clobrano
  • slintes
  • beekhof
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the logic that marks nodes as unschedulable, which is the core purpose of this PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@razo7
Copy link
Member Author

razo7 commented Jan 11, 2026

/test 4.21-openshift-e2e

@razo7 razo7 changed the title Avoid using marking the node as unscheduleable by updating the spec Avoid Marking the Node as Unscheduleable Jan 12, 2026
@slintes
Copy link
Member

slintes commented Jan 12, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 12, 2026
@razo7 razo7 marked this pull request as ready for review January 12, 2026 08:59
@openshift-ci openshift-ci bot requested review from beekhof and slintes January 12, 2026 08:59
@openshift-merge-bot openshift-merge-bot bot merged commit 5319357 into medik8s:main Jan 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants