During Galera bootstrap stage the following help scripts are created:
/usr/local/sbin/galera_init.sh
/usr/local/sbin/galera_bootstrap.sh
Both contain mysql root password in a plain text.
Set file permissions to 750
Change-Id: Ie0d5fa7f81ef7ccbd6b9def7a4f2141c32dcc4ee
Relaited-prod: https://mirantis.jira.com/browse/PROD-15487
Issue:
During bootstrap, formula creates file in: /var/lib/mysql
If galera replica has been broken for any reason, wsrep process
calls xtrabackup to recover replica and wipes away everything in
/var/lib/mysql with bootstrap flag as well.
Now this node is not marked as deployed and galera state rerun
would try to reprovision it and fail.
Fix:
Create and check flag in: /etc/mysql/.galera_bootstrap
Prod-Related: PROD-22715
Closes-Bug: PROD-22715
Change-Id: I27db65e1161e22a462dfd273647de4edbe450373
The patch deletes deprecated cmd.run function which actually
was defined in salt 2016 as alias for cmd.shell therefore this
change supports backward compatibility.
Change-Id: Idbbf869dfafb39d3bf90cdcb05e626cd563ce8e2
Related-Prod: 17056
When SSL enabled, /etc/mysq directory is created by salt.minion
state with 700 permissions. It prohibits mysql from reading config
file as normal mode is 755. This patch ensures that mode for
/etc/mysql and /etc/mysql/ssl have correct rights.
Change-Id: Icc2a43e7a56c60d30a716f29f0a9ec28c6549429
Related-Prod: ROD-16782
This patch removes separate state galera.ssl as it was previously
wrongly introduced. Instead include ssl tasks to master/slave when
ssl is enabled.
This fixes missing requirements when applying separate states.
Ensure that mysql package is installed before changing group
ownership for ssl files to mysql, as group will be added by mysql
packages.
Fix ssl inital configuration. SSL settings are not applied during
service reload, we have to add them during initial galera cluster
start.
Change-Id: Iff9a268000c3e5e722cc6e197cfd223ec1015f73
Related-Prod: PROD-16695
command called by service.dead state:
systemd-run --scope systemctl stop mysql.service
More common way is to shut down service using known credentials
Change-Id: I2abe7eeea850333139587347039b1de8a6ea486f
Galera master installation hangs on installation
mysql-server-wsrep-5.6. It seems that log_error is not working,
because of next message: "mysqld_safe Can't log to error log and
syslog at the same time. Remove all --log-error configuration
options for --syslog to take effect." Using "syslog = yes" instead
of log_error makes it works without any other changes.
Change-Id: I39a8a87ed048557c19f3843b97c75469385e4978
Closes-bug: PROD-9065
Bug: After deployment of linux formulas and salt states
/etc/security/limits.conf are not applying, as result connections
to mysql failed with error (pymysql.err.OperationalError)
(1040, u'Too many connections')
Solution: create mysql.overide, where ulimit is set to 102400
Closed-bug: PROD-8427