scripts/mysql.server fails to return 1 if restart fails to start

Bug #1339894 reported by Julia Kreger
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Committed
Undecided
Alex Yurchenko
5.6
Fix Released
Undecided
Alex Yurchenko
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Medium
Unassigned
5.6
Fix Released
Medium
Unassigned

Bug Description

Utilizing: Percona-XtraDB-Cluster-5.5.37-rel35.0-25.10.756.Linux.i686.tar.gz

The restart sequence in scripts/mysql.server fails to capture and return if the start call fails to start the server, so a restart can occur that failed upon start-up and the script could still return 0 as if it worked without any issues.

Supplied script:

  'restart')
    # Stop the service and regardless of whether it was
    # running or not, start it again.
    if $0 stop $other_args; then
      $0 start $other_args
    else
      log_failure_msg "Failed to stop running server, so refusing to try to start."
      exit 1
    fi
    ;;

Possible solution:

  'restart')
    # Stop the service and regardless of whether it was
    # running or not, start it again.
    if $0 stop $other_args; then
      if ! $0 start $other_args; then
        log_failure_msg "Failed to restart server."
        exit 1
      fi
    else
      log_failure_msg "Failed to stop running server, so refusing to try to start."
      exit 1
    fi
    ;;

Revision history for this message
Alex Yurchenko (ayurchen) wrote :
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-1108

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.