garbd service status always returns 0, breaking puppet

Bug #1422863 reported by Matt Fischer
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
Raghavendra D Prabhu
5.6
Fix Released
Undecided
Raghavendra D Prabhu

Bug Description

occurs in:

percona-xtradb-cluster-garbd-3.x 3.9.3421.trusty

service garbd status always returns 0. This breaks automation like puppet which assumes that with a successful return code, garbd is always running.

[DEV] root@bfd02-garbd-staging-001:~# service garbd status
 * garb is running
[DEV] root@bfd02-garbd-staging-001:~# echo $?
0
[DEV] root@bfd02-garbd-staging-001:~# service garbd stop
   ...done.
[DEV] root@bfd02-garbd-staging-001:~# echo $?
0
[DEV] root@bfd02-garbd-staging-001:~# service garbd status
 * garb is not running
[DEV] root@bfd02-garbd-staging-001:~# echo $?
0

Services should be returning non-0 codes when they're down.

For example:

[DEV] root@bfd02-garbd-staging-001:~# service ntp stop
 * Stopping NTP server ntpd [ OK ]
[DEV] root@bfd02-garbd-staging-001:~# service ntp status
 * NTP server is not running
[DEV] root@bfd02-garbd-staging-001:~# echo $?
3

Tags: i51031
Matt Fischer (mfisch)
description: updated
Revision history for this message
Matt Fischer (mfisch) wrote :
tags: added: i51031
Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

I am able to reproduce this issue on PXC 5.6 setup

root@node1:~# dpkg -l | grep -i "percona"
ii percona-xtrabackup 2.2.8-5059-1.trusty amd64 Open source backup tool for InnoDB and XtraDB
ii percona-xtradb-cluster-client-5.6 5.6.21-25.8-938.trusty amd64 Percona XtraDB Cluster database client binaries
ii percona-xtradb-cluster-common-5.6 5.6.21-25.8-938.trusty amd64 Percona XtraDB Cluster database common files (e.g. /etc/mysql/my.cnf)
ii percona-xtradb-cluster-galera-3.x 3.8.3390.trusty amd64 Galera components of Percona XtraDB Cluster
ii percona-xtradb-cluster-garbd-3.x 3.8.3390.trusty amd64 Garbd components of Percona XtraDB Cluster
ii percona-xtradb-cluster-server-5.6 5.6.21-25.8-938.trusty amd64 Percona XtraDB Cluster database server binaries

root@node1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

root@node1:~# service garbd status
 * garb is running
root@node1:~# echo $?
0
root@node1:~# service garbd stop
   ...done.
root@node1:~# echo $?
0

root@node1:~# ps -ef | grep -v grep | grep garbd
root@node1:~#
root@node1:~# service garbd status
 * garb is not running
root@node1:~# echo $?
0

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

I see "Fix released" as a status here, but I wonder when and how it was fixed, and in what released version.

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

@Valerii,

It is present in 5.6.22-25.8 for 5.6 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-1802

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.