'service mysql status' not producing valid exit codes

Bug #1237021 reported by Justice London on 2013-10-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster
Status tracked in 5.6

Bug Description

service mysql status
MySQL (Percona XtraDB Cluster) is not running [FAILED]


echo $?

This should produce a 1, 3, etc... basically any exit code but zero. Not doing so breaks Puppet and many other configuration management systems. For now I'll work around it.

Yes, that seems to be a regression from a recent bug fix,:

=== modified file 'Percona-Server/support-files/mysql.server.sh'
--- Percona-Server/support-files/mysql.server.sh 2013-09-30 10:12:43 +0000
+++ Percona-Server/support-files/mysql.server.sh 2013-10-08 19:40:45 +0000
@@ -412,6 +412,7 @@
       check_running 1
+ exit $?
       # Bootstrap the Percona XtraDB Cluster, start the first node

should fix it though.

Justice London (jlondon) wrote :

Indeed it should. I worked around it in such a way for now... but this obviously should be a fix in the next release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers