-
Notifications
You must be signed in to change notification settings - Fork 450
Description
I am working on Galera deployment with your container (I was previously using Bitnami all in one image).
I managed to configure all the nodes and secure the bootstrap. I have issues with nodes joining the cluster and healthcheck.
From what I understood, healthcheck user is generated locally on each node and credentials are stored in DATA folder. I saw that it should not be synced to other nodes and managed each time locally.
With Galera, it seems that the healthcheck user is propagated as they are totally in sync. So I tried to synchronize first node credential files to other nodes and it works, BUT:
Any new node joining the cluster, is clearing the content of the datadir:
WSREP_SST: [INFO] Cleaning the existing datadir and innodb-data/log directories
As the configuration file is stored there, it will be cleared each time there is a full sync performed on any node (after a restart and failure to perform an incremental sync for example).
At minimal, I was thinking that it would be nice to avoid storing this configuration file in the data directory to avoid potential removal of it during folder clear (maybe using another dedicated volume writeable in /etc/mysql folder?).
It would also be nice to expose env vars to allow defining the user and password of healthcheck (as there is already a var for MARIADB_HEALTHCHECK_GRANTS, there could be MARIADB_HEALTHCHECK_USER and MARIADB_HEALTHCHECK_PASSWORD).
Thus, if somebody wants to preform healthchecks, it is quite simple, he uses these variables and at entry point, the user is created if not existing + the configuration file is generated based on this during boot, without having to rely on a configuration file locally stored in data directory.
What do you think of all this?