I’m looking into the Percona XtraDB k8s Operator bootstrap behavior when running a single node. When booting a single node, it immediately goes into ‘crash mode’.
In theory, a first time single node should not setup replication, and should bootstrap, correct?
In the pxc node entrypoint, this section always runs, and the node detects itself as a peer, which switches on replication. This sets CLUSTER_JOIN, which instructs the node not to bootstrap here.
Hmm, if it doesn’t support single nodes, why is that an option in Everest, which uses the XtraDB operator?
Also, what I’ve noticed in testing is that even with multi-node setups, this happens, so the first member of the StatefulSet never initializes. Surely this is a problem with my particular environment, but I haven’t figured out why yet.
And we have lots of use cases where users deploy PXC with a single node for their dev/test environments (as it is obviously not recommended to run a single node in production).
As for the issue you are facing - it needs deeper investigation. It does not happen for me in minikube or GKE (checked just now) + we have a test for this use case. Can you attach the operator logs?
It’s true; I typed too fast. Although you can run the PXC operator with one node, it is considered unsafe.
That’s why a CR option allows you to run in unsafe mode.
Check for allowUnsafeConfigurations in your cr file. It should be true. If it is false and the single cluster-pxc pod is killed, it does not restart properly.
Thanks. The issue must be with my k8s environment. I’ll post logs later. Meanwhile, I was able to get the newer MySQL operator working with a single node.