Proper way to restart Percona XtraDB cluster


I changed some MySQL server options on cr.yaml, then applied the changes with the kubectl apply -command.

I verified that configmap has changed. Cluster is in “initializing” -state.

Documentation states:
“Do not forget to restart Percona XtraDB Cluster to ensure the cluster has updated the configuration (see details on how to connect in the Install Percona XtraDB Cluster on Kubernetes page).”

How exactly should restart be done?

1 Like

Hi @katajistok ,

I need to know the version of operator which you are using and also provide your CR (I need to know which exactly options were added).

1 Like

Hello. Version is 1.9.0. Options I added were: net_read_timeout and max_allowed_packet.

1 Like

@katajistok I have added the following lines to CR:

--- a/deploy/cr.yaml
+++ b/deploy/cr.yaml
@@ -57,8 +57,10 @@ spec:
 #    readinessDelaySec: 15
 #    livenessDelaySec: 600
 #    forceUnsafeBootstrap: false
-#    configuration: |
-#      [mysqld]
+    configuration: |
+      [mysqld]
+      max_allowed_packet=16M
+      net_read_timeout=35
 #      wsrep_debug=CLIENT
 #      wsrep_provider_options="gcache.size=1G; gcache.recover=yes"
 #      [sst]

And apply it. All three nodes were restarted automatically one by one. So, I can’t reproduce your issue. If you need to restart the cluster manually you need to do it in a proper order and do not restart the next pod if the previous one does not have ready state.
The correct order is:


I’ll try to delete Pods in specific order you mentioned. Do I need to wait until a new Pod is spawned and ready before I delete the next one? I’ll also try to re-produce this and copy & paste cr.yaml to somewhere and then I can refer to this configuration.

1 Like

Hello! I tried on another environment the same. It worked! Though it lasted like 1 hour to complete (I was not able to wait whole time).
My testing and result over here: Untitled - Pastebin
This is the configuration file: Untitled - Pastebin


1 Like

@katajistok Thank you for provided information. Could you please share the size of your DB and I need to know if the cluster was under the load at that time.

1 Like

I cannot remember what kind of data and how much there was data on this database. Max 10GB, because this has been the max size which we have used on testing.

1 Like