]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
hammer: monclient: avoid key renew storm on clock skew 8398/head
authorAlexey Sheplyakov <asheplyakov@mirantis.com>
Mon, 21 Mar 2016 15:20:18 +0000 (18:20 +0300)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Thu, 31 Mar 2016 13:21:44 +0000 (16:21 +0300)
commitac3569cd8bbb4b2b9a0edf298ce0b83bc18f1fea
treeba21dcf83e5f3c7313ce45d2c0ffe078e0b3edbb
parent7cfc739a513da84d76b959efc51dd21c1cc552d6
hammer: 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: #15336
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
(cherry picked from commit 918c12c2ab5d014d0623b1accf959b041aac5128)

Conflicts:
src/osd/OSD.cc
  no loadavg checks in Hammer, hence the conflict. Move the
  counter and max_attempts initialization to a suitable place.
src/mon/MonClient.cc
src/mon/MonClient.h
src/osd/OSD.cc