Return code incorrect when garbd is already running

Bug #1308100 reported by jmrenouard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Won't Fix
Medium
Yan Zhang
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
New
Undecided
Unassigned

Bug Description

Context:
SysV init.d script: /etc/init.d/garb
Garbd is already running and started correctly.

Observed result:
service garb start
echo $?
0

Awaited result:
When garbd is already started, return code shouldn't return 0.
0 means success
If garbd is already running so trying to start garbd is expected to fail and return an non-zero return code.

Solution: return 3 instead of 0

--- garbd_origin 2014-04-15 16:48:20.115360380 +0200
+++ garb 2014-04-15 16:49:24.866360234 +0200
@@ -97,7 +97,7 @@

        if [ -r $PIDFILE ]; then
                log_failure "$prog is already running with PID $(cat ${PIDFILE})"
- return 0
+ return 3
        fi

        [ -x $prog ] || return 5

Revision history for this message
jmrenouard (jmrenouard) wrote :

This is maybe a galera project bug.

I will post it in the galera project instead.

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

Yes, it indeed belongs to galera project.

Yan Zhang (yan.zhang)
Changed in codership-mysql:
status: New → Confirmed
assignee: nobody → Yan Zhang (yan.zhang)
importance: Undecided → Medium
Revision history for this message
jmrenouard (jmrenouard) wrote : Re: [Bug 1308100] Re: Return code incorrect when garbd is already running

Hello,

Thanks for your feedback.

This bugs has been duplicated in galera project.

BR,
Jean-Marie RENOUARD
________________________________
Mobile : +33 (0)6 62 69 58 81
Email : <email address hidden>
________________________________

On Wed, Apr 16, 2014 at 9:25 AM, Raghavendra D Prabhu <
<email address hidden>> wrote:

> Yes, it indeed belongs to galera project.
>
> ** Also affects: percona-xtradb-cluster
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1308100
>
> Title:
> Return code incorrect when garbd is already running
>
> Status in MySQL patches by Codership:
> New
> Status in Percona XtraDB Cluster - HA scalable solution for MySQL:
> New
>
> Bug description:
> Context:
> SysV init.d script: /etc/init.d/garb
> Garbd is already running and started correctly.
>
> Observed result:
> service garb start
> echo $?
> 0
>
> Awaited result:
> When garbd is already started, return code shouldn't return 0.
> 0 means success
> If garbd is already running so trying to start garbd is expected to fail
> and return an non-zero return code.
>
> Solution: return 3 instead of 0
>
> --- garbd_origin 2014-04-15 16:48:20.115360380 +0200
> +++ garb 2014-04-15 16:49:24.866360234 +0200
> @@ -97,7 +97,7 @@
>
> if [ -r $PIDFILE ]; then
> log_failure "$prog is already running with PID $(cat
> ${PIDFILE})"
> - return 0
> + return 3
> fi
>
> [ -x $prog ] || return 5
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/codership-mysql/+bug/1308100/+subscriptions
>

Yan Zhang (yan.zhang)
Changed in codership-mysql:
status: Confirmed → Won't Fix
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.