Commit 4beccf3
committed
Do not start galera as joiner with 1-replica cluster
The mariadb operator checks for available pods in the galera statefulset
to determine whether to start mysqld as a bootstrap or a joiner node on
all the pods that remain to be started.
When galera is deployed as a 1-replica cluster (e.g. in CI), there is
a small time window after the statefulset has been probed and galera marked
as 'bootstrapped', where the single pod can crash before being probed. If so,
the operator will try to restart the pod as a 'joiner', which is invalid.
Add a specific check for 1-replica deployments, so that the operator bails out
and requeue the event when a pod is identified as a joiner. This allows the
operator to reprobe the galera state restart the pod correctly, in order to
avoid an unecessary error in the logs.
Jira: OSPRH-78211 parent ff694b3 commit 4beccf3
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
711 | 720 | | |
712 | | - | |
| 721 | + | |
713 | 722 | | |
714 | 723 | | |
715 | 724 | | |
| |||
0 commit comments