Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent cluster restart after offline upgrade #178

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

spilchen
Copy link
Collaborator

This fixes a bug that caused a second cluster restart to occur after a successful offline upgrade. The cached pod facts weren't getting invalidated. So after the upgrade, it will proceed to the restart reconciler and using the stale facts think that a cluster restart is needed. Adding an invalidate to the restart reconciler fixed this problem.

Also fixing a minor issue with online upgrade. We could try to restart the primaries with 'AT -t restart_node'. This will fail because the cluster is read-only. Added a wait mechanism so that we only proceed with the primary restart once the server moves the secondaries into read-only mode. This last issue was minor, so I didn't bother adding a changie entry for it.

This fixes a bug that caused a second cluster restart to occur after a
successful offline upgrade.  The cached pod facts weren't getting
invalidated.  So after the upgrade, it will proceed to the restart
reconciler and using the stale facts think that a cluster restart is
needed.  Adding an invalidate to the restart reconciler fixed this
problem.

Also fixing a minor issue with online upgrade.  We could try to restart
the primaries with 'AT -t restart_node'.  This will fail because the
cluster is read-only.  Added a wait mechanism so that we only proceed
with the primary restart once the server moves the secondaries into
read-only mode.  This last issue was minor, so I didn't bother adding a
changie entry for it.
@spilchen spilchen requested a review from roypaulin March 16, 2022 13:43
@spilchen spilchen self-assigned this Mar 16, 2022
The new image could be different.  Consider the case where we try an
image but it breaks the upgrade path.  User would pick another
image to upgrade to.
Copy link
Collaborator

@roypaulin roypaulin left a comment

Choose a reason for hiding this comment

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

looks good.

@spilchen spilchen merged commit 65f54fe into vertica:main Mar 17, 2022
@spilchen spilchen deleted the avoid-restart-after-upgrade branch March 17, 2022 11:08
spilchen pushed a commit to spilchen/vertica-kubernetes that referenced this pull request Mar 21, 2022
This fixes a bug that caused a second cluster restart to occur after a
successful offline upgrade. The cached pod facts weren't getting invalidated.
So after the upgrade, it will proceed to the restart reconciler and using the
stale facts think that a cluster restart is needed. Adding an invalidate to the
restart reconciler fixed this problem.

Also fixing a minor issue with online upgrade. We could try to restart the
primaries with 'AT -t restart_node'. This will fail because the cluster is
read-only. Added a wait mechanism so that we only proceed with the primary
restart once the server moves the secondaries into read-only mode. This last
issue was minor, so I didn't bother adding a changie entry for it.
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.

2 participants