fix(deployd): force resynchronization of Application and Naisjob - #357
Closed
tronghn wants to merge 3 commits into
Closed
fix(deployd): force resynchronization of Application and Naisjob#357tronghn wants to merge 3 commits into
tronghn wants to merge 3 commits into
Conversation
Applications and Naisjobs gained a status subresource in liberator bacd0593. Before that, deployd's update replaced the whole resource and wiped .status, so Naiserator always found a hash mismatch and synchronized. Now the API server keeps .status, an unchanged spec matches the stored hash, and Naiserator skips synchronization without emitting an event. The deployment then waits until it times out. Clear the hash through the status subresource after writing the spec, so every deployment resynchronizes regardless of spec changes. This also unblocks resources stuck in FailedSynchronization, which persist their hash and otherwise never reconcile again without a spec change. Ignore Naiserator's no-op rollout event while waiting. It reports the state from before the forced resynchronization, and accepting it would report success without observing the rollout it triggers.
The envtest rig loads liberator CRDs that declare the status subresource, so these cases reproduce the timeout that plain unit tests cannot: an update no longer wipes .status, and only the deliberate patch clears the synchronization hash. Cover Naisjob as well, which had no coverage, and assert that the rest of the status survives so the patch stays scoped to the one field.
tronghn
force-pushed
the
fix/deployd-force-resync-apps-jobs
branch
from
August 6, 2026 07:41
265e671 to
3d895c3
Compare
Contributor
Author
|
I think we can implement a more elegant fix in Naiserator actually. Closing this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Redeploying an
ApplicationorNaisjobwith an unchanged spec hangs until timeout.Cause
Both resources gained a status subresource in liberator
bacd0593. Previously, deployd's
update unintentionally cleared
.status. Naiserator therefore always observed asynchronization hash mismatch and reconciled the resource.
The API server now preserves
.statusduring updates. For an unchanged spec, the storedhash still matches, so Naiserator skips reconciliation without emitting the event
deployd is waiting for.
Naiserator's mitigation in
786b92a8 only handles resources in
RolloutCompleteand reports completion without performing a new reconciliation.Solution
Compare the resource generation before and after the update. When the generation is
unchanged, clear
status.synchronizationHashthrough the status subresource. This forcesNaiserator to reconcile unchanged resources. Changed specs continue through the normal
reconciliation path without an additional status update.
Only the synchronization hash is cleared. Other operator-owned status fields remain
untouched.
This also lets resources in
FailedSynchronizationretry without requiring anartificial spec change.
Ignore Naiserator's no-op rollout event while waiting because it describes the state
before the forced reconciliation, not its result.