Closed lukasertl closed 5 months ago
And that's exactly what we expect, no?
No we don't expect that. This is not a change in patroni leadership, but etcd leadership.
oh, I see! Thanks. Will check this
Would you please check the PR if it works for you?
Thanks in advance!
Hi Pavlo,
I'm afraid this is not the correct fix. If I trigger the leader change situation with a patched vip-manager, it will leave the VIP setup intact, but the process is spinning on CPU.
I tried to find out what happens here, and I suspect that the select{}
in the watch() function doesn't block anymore, thus running in an uncontrolled infinite loop. My guess is that at this point the etcd Watch isn't valid anymore and needs to be setup from scratch.
This is confirmed by the fact that if I switch patroni roles in this situation, the (non-broken) vip-manager on the new primary would add the VIP to the interface, but the (broken) vip-manager on the old primary wouldn't remove it.
This is somewhat related to #208
When the etcd leader restarts, vip-manager decides to remove the VIP:
This happens with vip-manager 2.4.0