Percona XtraDB operator with single node detects itself as peer

Hello,

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.

Perhaps I’m misunderstanding something. Thanks.

Hi Joshua,

The Percona Operator for MySQL based on Percona XtraDB Cluster does not support single node mode.

I think you need to use Percona Operator for MySQL based on Percona Server for MySQL.

I hope this helps.

Pep

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.

@Joshua_Sierles I want to correct @Pep_Pla a bit. PXC supports one node. We even have cr-minimal.yaml as an example to deploy a single node.

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?

1 Like

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.

I hope this helps.

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.