Skip to content

[BUG] NodeReconciler permanently leaks transient errors into Status.FailedNodes #376

Description

@Ayush4958

What happened?

When NodeReconciler encounters an error evaluating a node, it records it in rule.Status.FailedNodes. If the error resolves on the next reconcile and evaluation succeeds, the controller fails to clear the old failure because it lacks an else block to handle success.

The stale failure is read from the local cache and actively merged back into the API server, permanently trapping the healthy node in the FailedNodes array. It only clears if a manual rule edit forces the RuleReconciler to run.

Steps to Reproduce

  1. Trigger a transient error during node evaluation
  2. Observe the node is added to rule.Status.FailedNodes.
  3. Resolve the error. The controller retries and evaluation succeeds.
  4. Check the rule status. The node operates normally but is permanently stuck in FailedNodes.

Expected Behavior

processNodeAgainstAllRules must include an else block to explicitly clear the node from rule.Status.FailedNodes upon successful evaluation, mirroring the correct logic found in processAllNodesForRule.

Controller Version / Image Tag

main

Kubernetes Version

Client Version v1.30.0

Controller Logs

No response

Additional Details

This issue is entirely distinct from PR #222 and PR #237.
Those PRs fixed the retry mechanism by ensuring that transient errors are properly returned to the reconciler so controller runtime can requeue them.

While those PRs ensured the controller retries on failure, they did not fix the controller forgetting to clean up Status.FailedNodes upon success.

Activity

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

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.triage/needs-informationIndicates an issue needs more information in order to work on it.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions