PKG systemctl status does not work on CentOS 7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On the following environment:
[root@galera1 ~]# cat /etc/centos-release
CentOS Linux release 7.1.1503 (Core)
[root@galera1 ~]# rpm -qa|grep -i percona
percona-
percona-
Percona-
Percona-
Percona-
percona-
Percona-
And with a functioning bootstrapped cluster:
[root@galera1 ~]# mysql -e 'show global status like "wsrep_cluster%"'
+------
| Variable_name | Value |
+------
| wsrep_cluster_
| wsrep_cluster_size | 1 |
| wsrep_cluster_
| wsrep_cluster_
+------
systemctl status reports the wrong status:
[root@galera1 ~]# systemctl status mysql
mysql.service - Percona XtraDB Cluster
Loaded: loaded (/usr/lib/
Active: failed (Result: exit-code) since Thu 2016-11-24 00:08:56 UTC; 15min ago
Nov 24 00:08:56 galera1 systemd[1]: Starting Percona XtraDB Cluster...
Nov 24 00:08:56 galera1 mysql-systemd[
Nov 24 00:08:56 galera1 systemd[1]: mysql.service: control process exited, code=exited status=1
Nov 24 00:08:56 galera1 systemd[1]: Failed to start Percona XtraDB Cluster.
Nov 24 00:08:56 galera1 systemd[1]: Unit mysql.service entered failed state.
Nov 24 00:10:12 galera1 systemd[1]: Stopped Percona XtraDB Cluster.
Nov 24 00:20:46 galera1 systemd[1]: Stopped Percona XtraDB Cluster.
Note the WARNING about another instance running. systemctl stop also does not work, and this behavior persists if I stop msyqld with 'mysqladmin shutdown' and then bootstrap PXC on the node again. The bootstrap procedure used is 'systemctl start <email address hidden>'
Here's MySQL's configuration:
[root@galera1 ~]# cat /etc/my.cnf
# Template my.cnf for PXC
# Edit to your requirements.
[mysqld]
log_bin
binlog_format = ROW
innodb_
innodb_
innodb_flush_method = O_DIRECT
innodb_
innodb_
innodb_
datadir = /var/lib/mysql
wsrep_cluster_
wsrep_provider = /usr/lib64/
wsrep_slave_threads = 8
wsrep_cluster_name = Cluster
wsrep_node_name = 10.0.1.37
wsrep_sst_method = xtrabackup-v2
wsrep_sst_auth = sstuser:sstpass
innodb_
innodb_
bind_address = 10.0.1.37
[mysqld_safe]
pid-file = /run/mysqld/
syslog
!includedir /etc/my.cnf.d
[root@galera1 ~]# ls /etc/my.cnf.d/
[root@galera1 ~]#
summary: |
- systemctl status does not work on CentOS 7 + PKG systemctl status does not work on CentOS 7 |
Changed in percona-xtradb-cluster: | |
status: | Confirmed → Fix Released |
Can confirm, however, this might be an issue with systemd (I guess). Will set to confirmed for now to let developers decide on next steps (eg code fix or doc update)
[root@c7b ~]# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
Bootstrap node1 size|cluster_ status" status Primary
[root@c7b ~]# systemctl start <email address hidden>
[root@c7b ~]# mysql -e "show status like 'wsrep_%'" | egrep "cluster_
wsrep_cluster_size 1
wsrep_cluster_
[root@c7b ~]# systemctl status mysql systemd/ system/ mysql.service; disabled; vendor preset: disabled)
● mysql.service - Percona XtraDB Cluster
Loaded: loaded (/usr/lib/
Active: inactive (dead)
Nov 25 04:19:11 c7b systemd[1]: Stopped Percona XtraDB Cluster. systemd/ system/ mysql.service; disabled; vendor preset: disabled) /usr/bin/ mysql-systemd start-pre (code=exited, status=1/FAILURE)
[root@c7b ~]# systemctl stop mysql
[root@c7b ~]# systemctl start mysql
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
[root@c7b ~]# systemctl status mysql
● mysql.service - Percona XtraDB Cluster
Loaded: loaded (/usr/lib/
Active: failed (Result: exit-code) since Fri 2016-11-25 04:25:26 UTC; 7s ago
Process: 1694 ExecStartPre=
Nov 25 04:25:26 c7b systemd[1]: Starting Percona XtraDB Cluster... 1694]: WARNING: Another instance of mysqld running on 1645, exiting..
Nov 25 04:25:26 c7b mysql-systemd[
Nov 25 04:25:26 c7b systemd[1]: mysql.service: control process exited, code=exited status=1
Nov 25 04:25:26 c7b systemd[1]: Failed to start Percona XtraDB Cluster.
Nov 25 04:25:26 c7b systemd[1]: Unit mysql.service entered failed state.
Nov 25 04:25:26 c7b systemd[1]: mysql.service failed.
[root@c7b ~]# systemctl | grep mysql mysql.boostrap mysql.bootstrap mysql.slice loaded active active system-mysql.slice
● mysql.service loaded failed failed Percona XtraDB Cluster
● <email address hidden> loaded failed failed Percona XtraDB Cluster with config /etc/sysconfig/
<email address hidden> loaded active running Percona XtraDB Cluster with config /etc/sysconfig/
system-
Check status with: mysql.bootstrap systemd/ system/ mysql@. service; disabled; vendor preset: disabled) /usr/bin/ mysql-systemd start-post $MAINPID (code=exited, status=0/SUCCESS) /usr/bin/ mysql-systemd start-pre (code=exited, status=0/SUCCESS) mysqld_ safe --basedir=/usr --wsrep-new-cluster /var/lib/ mysql --plugin- dir=/usr/ lib64/mysql/ plugin --user=mysql --wsrep- provider= /usr/lib64/ galera3/ libgalera_ smm.so --wsrep-new-cluster --pid-file=...
[root@c7b ~]# systemctl status <email address hidden>
● <email address hidden> - Percona XtraDB Cluster with config /etc/sysconfig/
Loaded: loaded (/usr/lib/
Active: active (running) since Fri 2016-11-25 04:23:41 UTC; 2min 38s ago
Process: 1301 ExecStartPost=
Process: 1253 ExecStartPre=
Main PID: 1300 (mysqld_safe)
CGroup: /<email address hidden>
├─1300 /bin/sh /usr/bin/
├─1645 /usr/sbin/mysqld --basedir=/usr --datadir=
└─1646 logger -t mysqld -p daemon.error
Nov 25 ...