]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monc: less noisy about rotating keys
authorSage Weil <sage@newdream.net>
Fri, 23 Oct 2009 23:40:16 +0000 (16:40 -0700)
committerSage Weil <sage@newdream.net>
Fri, 23 Oct 2009 23:40:16 +0000 (16:40 -0700)
src/mon/MonClient.cc
src/mon/MonClient.h

index 780add0e2522db6a605c7d26e7505270ba44b4d0..82b5f090078b047f867bb038a35d3e8f1d77c2d2 100644 (file)
@@ -339,8 +339,7 @@ void MonClient::handle_auth(MAuthReply *m)
       authenticate_cond.SignalAll();
     }
   
-    if (g_keyring.need_rotating_secrets())
-      _start_auth_rotating();
+    _check_auth_rotating();
 
     auth_cond.SignalAll();
   }
@@ -460,11 +459,8 @@ void MonClient::tick()
 {
   dout(10) << "tick" << dendl;
 
-  if (g_keyring.need_rotating_secrets()) {
-    dout(0) << "MonClient::tick: need rotating secret" << dendl;
-    _start_auth_rotating();
-  }
-
+  _check_auth_rotating();
+  
   if (hunting) {
     dout(0) << "continuing hunt" << dendl;
     _reopen_session();
@@ -540,10 +536,13 @@ int MonClient::wait_authenticate(double timeout)
   return ret;
 }
 
-int MonClient::_start_auth_rotating()
+int MonClient::_check_auth_rotating()
 {
+  if (!g_keyring.need_rotating_secrets())
+    return 0;
+
   if (!auth_principal_needs_rotating_keys(entity_name)) {
-    dout(0) << "_start_auth_rotating not needed by " << entity_name << dendl;
+    dout(20) << "_check_auth_rotating not needed by " << entity_name << dendl;
     return 0;
   }
 
index c39b860b67f88c5d40619f27f868485bb8bc6f3e..0240703c9841e08e8af7f1d25a617899897fe3ce 100644 (file)
@@ -108,7 +108,7 @@ private:
 public:
   void set_entity_name(EntityName name) { entity_name = name; }
 
-  int _start_auth_rotating();
+  int _check_auth_rotating();
   int wait_auth_rotating(double timeout);
 
   int mount(double mount_timeout);