'service mysql status' not producing valid exit codes

Bug #1237021 reported by Justice London
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
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.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

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.

Revision history for this message
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.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1464

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.