Conversation
The rolling upgrade test installs the previous release with 2 controller
replicas, but upgrades with `make helm-install-provider`, which sets no
replica count. The chart then falls back to 1 replica. On release/v0.10.x
that also turns leader election off and deletes the leader-election Role.
The old leader still has leader election on, so it is denied its Lease,
fails to renew within the deadline, and exits ("leader election lost").
The scale-down to 1 has already removed the other old pod. When the new
pod gets Ready before the crashed old pod comes back, no old pod is Ready
after the migration and the poll times out after 6 minutes with
"target schema was not observed while old controller pods were still
ready".
Pass --set controller.replicas=2 to the upgrade, as an operator doing a
rolling upgrade would. The Role stays, no old pod exits, and the rollout
keeps both old pods until the new one is Ready.
Signed-off-by: Danielle Mustillo <danielle.mustillo@solo.io>
Signed-off-by: Danielle Mustillo <danielle.mustillo@solo.io>
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.
Why
rolling-upgrade-tests (prev-stable)fails sometimes onrelease/v0.10.xwith "target schema was not observed while old controller pods were still ready". It failed twice, then passed, on the same commit in #3738.The test installs the previous release with 2 controller replicas, but its upgrade sets no replica count, so the chart drops to 1. At 1 replica the chart also deletes the leader-election Role. The old leader is then denied its Lease, logs
leader election lost, and exits. When the new pod gets Ready before the crashed old pod restarts, no old pod is Ready after the migration, and the test times out.What changed
--set controller.replicas=2to the upgrade, as an operator would.Scope
mainis not affected: its leader-election Role does not depend on the replica count.--reuse-values) still sees the old controller restart once. The kagent UI and API can then be unavailable for up to about 30 seconds before they recover on their own, with no data lost.Verification
go vetandmake -C go lintpass.rolling-upgrade-tests (prev-stable)is re-run several times on this PR.