Percona XtraDB Cluster - HA scalable solution for MySQL

'service mysql status' not producing valid exit codes

Reported by Justice London on 2013-10-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster
Status tracked in Trunk
5.6
Undecided
Unassigned
Trunk
Undecided
Unassigned

Bug Description

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

->

echo $?
0

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 @@
     ;;
   'status')
       check_running 1
+ exit $?
     ;;
   'bootstrap-pxc')
       # 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