diff options
author | Sage Weil <sage@inktank.com> | 2013-06-24 12:25:58 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-24 12:25:58 -0700 |
commit | 8cc36895e28819ac7076bb87b44ac0d341ba5add (patch) | |
tree | d0911514295be4c1e5c5f2e6f11682c07bb551d0 | |
parent | 134d08a9654f66634b893d493e4a92f38acc63cf (diff) | |
parent | f046dab88fcfeda23391bcd694abc65ff1ed8cd8 (diff) | |
download | ceph-8cc36895e28819ac7076bb87b44ac0d341ba5add.tar.gz |
Merge remote-tracking branch 'gh/next'
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | src/auth/cephx/CephxKeyServer.cc | 1 | ||||
-rw-r--r-- | src/mon/AuthMonitor.cc | 14 | ||||
-rw-r--r-- | src/mon/AuthMonitor.h | 2 | ||||
-rw-r--r-- | src/mon/OSDMonitor.cc | 12 | ||||
-rw-r--r-- | src/mon/OSDMonitor.h | 4 |
6 files changed, 27 insertions, 8 deletions
diff --git a/debian/control b/debian/control index 181cb4c8458..203517452f6 100644 --- a/debian/control +++ b/debian/control @@ -153,7 +153,7 @@ Description: debugging symbols for rbd-fuse Package: ceph-common Architecture: linux-any Depends: librbd1 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}, - python-ceph + python-ceph (= ${binary:Version}) Conflicts: ceph-client-tools Replaces: ceph-client-tools Suggests: ceph, ceph-mds diff --git a/src/auth/cephx/CephxKeyServer.cc b/src/auth/cephx/CephxKeyServer.cc index d73684d9624..ffe356882ee 100644 --- a/src/auth/cephx/CephxKeyServer.cc +++ b/src/auth/cephx/CephxKeyServer.cc @@ -160,6 +160,7 @@ bool KeyServer::_check_rotating_secrets() added += _rotate_secret(CEPH_ENTITY_TYPE_MDS); if (added) { + ldout(cct, 10) << __func__ << " added " << added << dendl; data.rotating_ver++; //data.next_rotating_time = ceph_clock_now(cct); //data.next_rotating_time += MIN(g_conf->auth_mon_ticket_ttl, g_conf->auth_service_ticket_ttl); diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index 5fa8644f393..4dbdd3a11b4 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -50,15 +50,15 @@ ostream& operator<<(ostream& out, AuthMonitor& pm) return out << "auth"; } -void AuthMonitor::check_rotate() +bool AuthMonitor::check_rotate() { KeyServerData::Incremental rot_inc; rot_inc.op = KeyServerData::AUTH_INC_SET_ROTATING; if (!mon->key_server.updated_rotating(rot_inc.rotating_bl, last_rotating_ver)) - return; - dout(10) << "AuthMonitor::tick() updated rotating, now calling propose_pending" << dendl; + return false; + dout(10) << __func__ << " updated rotating" << dendl; push_cephx_inc(rot_inc); - propose_pending(); + return true; } /* @@ -73,7 +73,8 @@ void AuthMonitor::tick() if (!mon->is_leader()) return; - check_rotate(); + if (check_rotate()) + propose_pending(); } void AuthMonitor::on_active() @@ -109,6 +110,9 @@ void AuthMonitor::create_initial() inc.inc_type = GLOBAL_ID; inc.max_global_id = max_global_id; pending_auth.push_back(inc); + + // initalize rotating keys, too + check_rotate(); } void AuthMonitor::update_from_paxos(bool *need_bootstrap) diff --git a/src/mon/AuthMonitor.h b/src/mon/AuthMonitor.h index 5c17105692b..ab52833daec 100644 --- a/src/mon/AuthMonitor.h +++ b/src/mon/AuthMonitor.h @@ -148,7 +148,7 @@ private: bool preprocess_command(MMonCommand *m); bool prepare_command(MMonCommand *m); - void check_rotate(); + bool check_rotate(); public: AuthMonitor(Monitor *mn, Paxos *p, const string& service_name) : PaxosService(mn, p, service_name), last_rotating_ver(0), diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index f1728c0240d..a623afed019 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -968,8 +968,10 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) << m->get_orig_source_inst() << "\n"; failure_info_t& fi = failure_info[target_osd]; MOSDFailure *old = fi.add_report(reporter, failed_since, m); - if (old) + if (old) { mon->no_reply(old); + old->put(); + } return check_failure(now, target_osd, fi); } else { @@ -978,7 +980,14 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) << m->get_orig_source_inst() << "\n"; if (failure_info.count(target_osd)) { failure_info_t& fi = failure_info[target_osd]; + list<MOSDFailure*> ls; + fi.take_report_messages(ls); fi.cancel_report(reporter); + while (!ls.empty()) { + mon->no_reply(ls.front()); + ls.front()->put(); + ls.pop_front(); + } if (fi.reporters.empty()) { dout(10) << " removing last failure_info for osd." << target_osd << dendl; failure_info.erase(target_osd); @@ -991,6 +1000,7 @@ bool OSDMonitor::prepare_failure(MOSDFailure *m) dout(10) << " no failure_info for osd." << target_osd << dendl; } mon->no_reply(m); + m->put(); } return false; diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index ab0962c0a6b..d8afd3d15dd 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -45,6 +45,10 @@ struct failure_reporter_t { failure_reporter_t() : num_reports(0), msg(NULL) {} failure_reporter_t(utime_t s) : num_reports(1), failed_since(s), msg(NULL) {} + ~failure_reporter_t() { + // caller should have taken this message before removing the entry. + assert(!msg); + } }; /// information about all failure reports for one osd |