From: Sage Weil Date: Mon, 25 Aug 2014 04:10:27 +0000 (-0700) Subject: mon: flush paxos write on shutdown X-Git-Tag: v0.86~190^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb119360ac5a63c30e6fc0874c333bbefb8f19e7;p=ceph.git mon: flush paxos write on shutdown Signed-off-by: Sage Weil --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index ced69a5b0966..597f3b0c8de3 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -732,10 +732,19 @@ void Monitor::update_logger() void Monitor::shutdown() { dout(1) << "shutdown" << dendl; + lock.Lock(); state = STATE_SHUTDOWN; + if (paxos->is_writing() || paxos->is_writing_previous()) { + dout(10) << __func__ << " flushing" << dendl; + lock.Unlock(); + store->flush(); + lock.Lock(); + dout(10) << __func__ << " flushed" << dendl; + } + if (admin_hook) { AdminSocket* admin_socket = cct->get_admin_socket(); admin_socket->unregister_command("mon_status");