mysql might still be up even though the mysqladmin ping returns otherwise

Bug #1197161 reported by Nikhil Manchanda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Nikhil Manchanda

Bug Description

mysqladmin ping returns whether it is able to connect to mysql. However, for a short window, while mysql is shutting down, it stops accepting network connections and is still cleaning up innodb pages. (The mysqld process is still alive)

Trying to start mysql during this window fails with:
"mysqld_safe A mysqld process already exists"

Suggested fix is to use pgrep instead of mysqladmin ping to see if the mysqld process is still running, before trying to start mysql.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/35392

Changed in trove:
assignee: nobody → Nikhil Manchanda (slicknik)
status: New → In Progress
Changed in trove:
milestone: none → havana-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/35392
Committed: http://github.com/openstack/trove/commit/850ccd41924b3e747064dff79c5d73cd47d88cc7
Submitter: Jenkins
Branch: master

commit 850ccd41924b3e747064dff79c5d73cd47d88cc7
Author: Nikhil Manchanda <email address hidden>
Date: Tue Jul 2 14:42:19 2013 -0700

    Restore should use pgrep instead of mysqladmin to check for mysql down

    For a short window, while mysql is shutting down, it stops accepting
    network connections but the mysqld process is still alive.

    During this window mysqladmin ping reports that mysql is down and
    trying to start mysql fails with:
    "mysqld_safe A mysqld process already exists"

    Use pgrep (during restore) instead of mysqladmin ping to check mysql
    is down to fix this.

    Fixes bug: 1197161

    Change-Id: Id8b8e15b4b6136c8acbc3cac17691a65a1a4ed14

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: havana-2 → 2013.2
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.