Option("max_rotating_auth_attempts", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(10)
- .set_description(""),
+ .set_description("number of attempts to initialize rotating keys before giving up"),
+
+ Option("rotating_keys_bootstrap_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+ .set_default(30)
+ .set_description("timeout for obtaining rotating keys during bootstrap phase (seconds)"),
+
+ Option("rotating_keys_renewal_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+ .set_default(10)
+ .set_description("timeout for updating rotating keys (seconds)"),
Option("cephx_require_signatures", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
.set_default(false)
}
int rotating_auth_attempts = 0;
- while (monc->wait_auth_rotating(30.0) < 0) {
+ auto rotating_auth_timeout =
+ g_conf().get_val<int64_t>("rotating_keys_bootstrap_timeout");
+ while (monc->wait_auth_rotating(rotating_auth_timeout) < 0) {
if (++rotating_auth_attempts <= g_conf()->max_rotating_auth_attempts) {
derr << "unable to obtain rotating service keys; retrying" << dendl;
continue;
return true;
if (force_new) {
- if (monc->wait_auth_rotating(10) < 0)
+ auto timeout = g_conf().get_val<int64_t>("rotating_keys_renewal_timeout");
+ if (monc->wait_auth_rotating(timeout) < 0)
return false;
}
}
if (force_new) {
- if (monc->wait_auth_rotating(10) < 0)
+ auto timeout = g_conf().get_val<int64_t>("rotating_keys_renewal_timeout");
+ if (monc->wait_auth_rotating(timeout) < 0)
return false;
}
return true;
if (force_new) {
- if (monc.wait_auth_rotating(10) < 0)
+ auto timeout = cct->_conf.get_val<int64_t>("rotating_keys_renewal_timeout");
+ if (monc.wait_auth_rotating(timeout) < 0)
return false;
}
}
int rotating_auth_attempts = 0;
+ auto rotating_auth_timeout =
+ g_conf().get_val<int64_t>("rotating_keys_bootstrap_timeout");
// sanity check long object name handling
{
exit(1);
}
- while (monc->wait_auth_rotating(30.0) < 0) {
+ while (monc->wait_auth_rotating(rotating_auth_timeout) < 0) {
derr << "unable to obtain rotating service keys; retrying" << dendl;
++rotating_auth_attempts;
if (rotating_auth_attempts > g_conf()->max_rotating_auth_attempts) {
if (force_new) {
/* the MonClient checks keys every tick(), so we should just wait for that cycle
to get through */
- if (monc->wait_auth_rotating(10) < 0) {
+ auto timeout = g_conf().get_val<int64_t>("rotating_keys_renewal_timeout");
+ if (monc->wait_auth_rotating(timeout) < 0) {
derr << "OSD::ms_get_authorizer wait_auth_rotating failed" << dendl;
return false;
}
return true;
if (force_new) {
- if (monc->wait_auth_rotating(10) < 0)
+ auto timeout =
+ g_ceph_context->_conf.get_val<int64_t>("rotating_keys_renewal_timeout");
+ if (monc->wait_auth_rotating(timeout) < 0)
return false;
}