]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
monclient: avoid key renew storm on clock skew 8258/head
authorAlexey Sheplyakov <asheplyakov@mirantis.com>
Mon, 21 Mar 2016 15:20:18 +0000 (18:20 +0300)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Tue, 22 Mar 2016 08:46:33 +0000 (11:46 +0300)
commit918c12c2ab5d014d0623b1accf959b041aac5128
tree57b14331bb6d8847a4e39ff8fa8e38c48b82dfa3
parent6e7417018963fc4041f350234f738020af845bd8
monclient: avoid key renew storm on clock skew

Refreshing rotating keys too often is a symptom of a clock skew, try to
detect it and don't cause extra problems:

* MonClient::_check_auth_rotating:
  - detect and report premature keys expiration due to a time skew
  - rate limit refreshing the keys to avoid excessive RAM and CPU usage
    (both by OSD in question and monitors which have to process a lot
    of auth messages)
* MonClient::wait_auth_rotating: wait for valid (not expired) keys
* OSD::init(): bail out after 10 attempts to obtain the rotating keys

Fixes: #12065
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
src/mon/MonClient.cc
src/mon/MonClient.h
src/osd/OSD.cc