mirror of
https://github.com/ceph/ceph
synced 2025-02-21 09:57:26 +00:00
mds: avoid key renew storm on clock skew
Check 918c12c2ab (diff-fa6c2eba8356ae1442d1bf749beacfdf)
for detail information.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
7dae094c0f
commit
da27c33b69
@ -474,8 +474,21 @@ int MDSDaemon::init(MDSMap::DaemonState wanted_state)
|
||||
mds_lock.Unlock();
|
||||
return r;
|
||||
}
|
||||
|
||||
int rotating_auth_attempts = 0;
|
||||
const int max_rotating_auth_attempts = 10;
|
||||
|
||||
while (monc->wait_auth_rotating(30.0) < 0) {
|
||||
derr << "unable to obtain rotating service keys; retrying" << dendl;
|
||||
if (++rotating_auth_attempts <= max_rotating_auth_attempts) {
|
||||
derr << "unable to obtain rotating service keys; retrying" << dendl;
|
||||
continue;
|
||||
}
|
||||
derr << "ERROR: failed to refresh rotating keys, "
|
||||
<< "maximum retry time reached." << dendl;
|
||||
mds_lock.Lock();
|
||||
suicide();
|
||||
mds_lock.Unlock();
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
objecter->start();
|
||||
|
Loading…
Reference in New Issue
Block a user