mysql-systemd start-post never returns when pid_file specified in multiple sections of the my.cnf
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.6 |
Fix Released
|
Undecided
|
Tomislav Plavcic |
Bug Description
Environment:
OS: CentOS 7.0 (systemd)
Package versions:
[vagrant@
Percona-
percona-
Percona-
Percona-
Percona-
percona-
Description of the issue:
I've installed the percona galera server, and I created my own my.cnf, then I tried to start it via
"systemctl start <email address hidden>" and it did not returned even after ~15 mins...
so I checked the system what is going on:
root 5220 0.0 0.1 132496 1152 pts/0 S+ 04:15 0:00 systemctl start <email address hidden>
root 5309 0.0 0.1 115348 1732 ? Ss 04:15 0:00 /bin/sh /usr/bin/
root 5310 0.0 0.1 115216 1664 ? Ss 04:15 0:00 /bin/bash -ue /usr/bin/
mysql 6206 0.0 11.2 1249676 99884 ? Sl 04:15 0:01 /usr/sbin/mysqld --basedir=/usr --datadir=
I checked (and added some printouts) to the mysql-systemd script as that looked "hanging":
[root@galera_node1 ~]# /bin/bash -ue /usr/bin/
action: start-post
pid_file_path: /var/run/
^C
[root@galera_node1 ~]# vi /etc/my.cnf
[root@galera_node1 ~]# /bin/bash -ue /usr/bin/
action: start-post
pid_file_path: /var/run/
6206
SUCCESS!
wait_for_pid created finished.
Apparently the problem was caused by the 'pid_file' config option, I had it both in the [mysqld] and [mysqld_safe] groups, and this caused the mysql-systemd script to be "hanging".
My fix / workaround:
After I removed the repeated pid_file option from the [mysqld_safe] group of my my.cnf and then the mysqld-systemd exited properly ^^^.
But I still think that the 'mysqld-systemd' helper script should tolerate this (and must not *hang*).
Hi again, now I had similar issue (i had 'datadir' defined under both mysqld and mysqld_safe section in my 'my.cnf')
and now systemctl start mysql@bootsrap failed in the 'pre-step':
[root@testbox115 lib]# bash -x /usr/bin/ mysql-systemd start-pre; echo $? mysql_install_ db --rpm '--datadir= /var/lib/ mysql /var/lib/mysql' --user=mysql
# and the problematic line because of the parsing issue:
+ /usr/bin/
Used package version on CentOS7: XtraDB- Cluster- server- 55-5.5. 41-25.11. 853.el7. x86_64
Percona-
So this '/usr/bin/ mysql-systemd' must be really fixed to properly handle this same option is defined under multiple 'groups' in my.cnf issue....