Commit 9b7568f
committed
OCPBUGS-60098: podman-etcd: avoid leaving member list on last active agent
When stopping an etcd instance, the agent should not leave the member
list if it's the last active agent in the cluster. Leaving the member
list in this scenario can cause WAL corruption.
This change introduces a check for the number of active resources before
attempting to leave the member list. If no other active resources are
found, the agent will log a message and skip the leave operation.
NOTE: the check on `standalone_node` might not be enough if both agents
stop roughly at the same time, hence none of them has enough time to set
the attribute.1 parent 677e3ad commit 9b7568f
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2046 | 2046 | | |
2047 | 2047 | | |
2048 | 2048 | | |
| 2049 | + | |
| 2050 | + | |
2049 | 2051 | | |
2050 | 2052 | | |
| 2053 | + | |
| 2054 | + | |
2051 | 2055 | | |
2052 | 2056 | | |
2053 | 2057 | | |
| |||
0 commit comments