-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
galera_bootstrap_set_root_password causes failures when adding DBs or users later on #6
Comments
What version of galera do you use? Because every version little bit differs. You need to start galera and set root, debian passwords. Then you need to stop and start galera as new-cluster. Then other nodes can join. |
On 17-10-16 15:50, Jakub Pavlik wrote:
25.2.9
I think that is what the galera master.sls is trying to do, but setting Not sure if the order is correct; if I run state.sls galera.sls, I'm |
OK, good so then please set version of formula 0.2+0 because we stopped supported this packages and replaced them for Mirantis Packages 8 and 9 |
You need to set Mirantis repos: http://mirror.fuel-infra.org/mos-repos/ubuntu/9.0/pool/main/g/ |
On 17-10-16 18:10, Jakub Pavlik wrote:
OK, thanks. I'm trying to get the workshop example running but I |
I've now set up a three-server galera cluster, but the formula for galera/server still complains:
|
OK, I'm starting to understand how this is meant to work. According to |
It should work if you have correct packages and first run. We put credentials for root directly into formula. So you do not need to have debian-sys-maint. Check if you have latest formula. |
So what is the relationship with salt-formula-mysql? There seems to be some overlap in what these formulas try to achieve. I've set up my galera cluster now but I don't see where the root creds are used in e.g. https://github.com/tcpcloud/salt-formula-galera/blob/master/galera/server.sls#L13 which is code that hasn't been updated in more than a year; compared to https://github.com/tcpcloud/salt-formula-mysql/blob/master/mysql/server/database.sls#L15 which is much fresher. |
mysql formula creates databases. Galera formula just deploy galera and set root and debian password. so we combine those together. |
Forgive me if I understand this entirely the wrong way.
The galera/master.sls sets the mysql root password during the bootstrap phase in galera_bootstrap_set_root_password.
https://github.com/tcpcloud/salt-formula-galera/blob/master/galera/master.sls#L81
It does so with the mysqladmin command, without passing any authentication data. This works because the root user by default can access mysql on localhost without a password.
But after this command that is no longer the case. The root user can not use any mysql commands without using a password. Since the default for the mysql state module of saltstack is to interact as root without a password, every attempt to create a database or add a user will fail.
Even a repeat call to the galera_bootstrap_set_root_password state will fail, which means that if anything goes wrong during the bootstrapping we're stuck with an unusable system.
Is there a point to setting an explicit password for root? Isn't it reasonable to let root log in for local connections?
The text was updated successfully, but these errors were encountered: