Skip to content

fix: degrade condition overwritten by the next reconcile - #220

Open
alicefr wants to merge 1 commit into
bootc-dev:mainfrom
alicefr:fix-bug-217
Open

alicefr wants to merge 1 commit into
bootc-dev:mainfrom
alicefr:fix-bug-217

Conversation

@alicefr

@alicefr alicefr commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

When tag resolution fails for a BootcNodePool, the Degraded condition is correctly set but lost on the next reconcile: the blanket healthy-reset clears it and the deferred resolution path returns early without re-applying it.

Re-set the TagResolutionError condition when resolution is not yet due and TargetDigest is still empty, meaning no prior resolution has succeeded.

Fixes: #217

@alicefr

alicefr commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

@Mergifyio backport release-0.1

@mergify

mergify Bot commented Oct 5, 2026

Copy link
Copy Markdown

backport release-0.1

🟠 Waiting for conditions to match

Details
  • merged [📌 backport requirement]

@alicefr
alicefr force-pushed the fix-bug-217 branch 2 times, most recently from 5bfd69b to e059b66 Compare October 5, 2026 13:02
); prev != nil &&
prev.Status == metav1.ConditionTrue &&
prev.Reason == bootcv1alpha1.PoolTagResolutionError {
setPoolDegraded(pool, prev.Reason, prev.Message)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

each reconcile first changes Degraded from True to False, then this call changes it back to True.

SetStatusCondition updates LastTransitionTime on both status transitions, so the final status differs from the saved status and gets written again?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The fact that we always set the healthy condition first is becoming problematic. I'm going to try the alternative that the degraded condition needs to be clear upon resolution instead of always set the healthy and then change it to degraded

@alicefr
alicefr marked this pull request as draft October 6, 2026 07:28
Replace the blanket Degraded=False reset at the top of each reconcile
with per-reason clearing. Each check clears its own degraded reason on
success via clearPoolDegradedReason, and rollout-path reasons are
cleared before syncMembership/driveRollout re-evaluate them.

This avoids the False->True->False ping-pong on LastTransitionTime that
caused a spurious status write every reconcile when tag resolution was
deferred.

Assisted-by: AI
Signed-off-by: Alice Frosi <afrosi@redhat.com>
@alicefr
alicefr marked this pull request as ready for review October 6, 2026 09:19

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Wrong image should cause the bootcnodepool to be in degraded state

2 participants