-
Notifications
You must be signed in to change notification settings - Fork 1k
Re-create pods only if all replicas are running #903
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
Conversation
As of commit
The patched operator under such circumstances will report update success without actually re-creating the pods. The 1st Sync after reinit terminates will find out incomplete rolling update thanks to annotations and complete it. Note Patroni returns the
in the logs is not an error in this case. |
👍 |
1 similar comment
👍 |
Operator currently kills pods too eagerly, for example, when re-init is still running.
Here a sequence of events leading to the problem:
Re-doing re-init on the same pod later suffers from the same problem because the rolling upgrade may not complete. For instance, when a replica on pod -0 is being constantly killed but pod-1 is the yet-to-be-updated master.
The current workaround for this problem is to manually shut down the operator, let the re-init complete and then start the operator again.
The PR fixes this by asking Patroni to confirm there is no PG replicas in in the
creating-replica
state before deleting any pod. If that check fails, pod re-creation is postponed until nextSync
.@FxKu can you please link related issues ?