Commit 8bc6668c authored by Christian Mohrbacher's avatar Christian Mohrbacher

client: reset sysTargetOfflineTimeoutSecs and sysUpdateTargetStatesSecs to 900 and 60 seconds

sysTargetOfflineTimeoutSecs was shorter than the default client timeout,
i.e. if a management got restarted the client would fail earlier than
expected. On the other hand sysUpdateTargetStatesSecs was too high, i.e.
after the management came back, the client needed a long time to be fully
working again.

Also see Gitlab #370.

(cherry picked from commit e0862d5a7cc3fedda200903f798dc7fd95116c41)
parent 8eb82a16
......@@ -51,7 +51,8 @@ sysCreateHardlinksAsSymlinks = false
sysMountSanityCheckMS = 11000
sysSessionCheckOnClose = false
sysSyncOnClose = false
sysTargetOfflineTimeoutSecs = 360
sysTargetOfflineTimeoutSecs = 900
sysUpdateTargetStatesSecs = 60
sysXAttrsEnabled = false
tuneFileCacheType = buffered
......@@ -311,9 +312,18 @@ sysACLsEnabled = false
# If this value is 0, targets will never be set to offline due to an
# unreachable management node and will stay in state probably-offline.
# Note: This must be at least twice as large as the value of
# sysTargetOfflineTimoutSecs in the server config files.
# sysTargetOfflineTimoutSecs in the server config files.
# Values: time in seconds
# Default: 360
# Default: 900
# [sysUpdateTargetStatesSecs]
# Interval in which the states of the storage targets are checked.
# Note: Should be no higher than twice the sysUpdateTargetStatesSecs value set
# in the server config files.
# Note: This must be significantly shorter than the sysTargetOfflineTimeoutSecs
# value set in the server (recommendation: maximum 1/3 of it).
# Values: time in seconds
# Default: 60
# [sysXAttrsEnabled]
# Enable extended attributes (also know as EAs/xattrs).
......
......@@ -220,8 +220,8 @@ void _Config_loadDefaults(Config* this)
_Config_configMapRedefine(this, "sysSyncOnClose", "false");
_Config_configMapRedefine(this, "sysSessionCheckOnClose", "false");
_Config_configMapRedefine(this, "sysUpdateTargetStatesSecs", "0");
_Config_configMapRedefine(this, "sysTargetOfflineTimeoutSecs", "360");
_Config_configMapRedefine(this, "sysUpdateTargetStatesSecs", "60");
_Config_configMapRedefine(this, "sysTargetOfflineTimeoutSecs", "900");
// Note: The default here is intentionally set to double the value from the server config.
// This ensures that the servers push their state twice during one Mgmtd InternodeSyncer run,
// but the client only needs to fetch the states once during that period.
......
......@@ -151,18 +151,12 @@ void _InternodeSyncer_requestLoop(InternodeSyncer* this)
const unsigned mgmtInitIntervalMS = 5000;
const unsigned reregisterIntervalMS = 300000;
const unsigned downloadNodesIntervalMS = 180000;
const unsigned updateTargetStatesMS = Config_getSysUpdateTargetStatesSecs(this->cfg) * 1000;
const unsigned delayedOpsIntervalMS = 60*1000;
const unsigned idleDisconnectIntervalMS = 70*60*1000; /* 70 minutes (must be
less than half the server-side streamlis idle disconnect interval to avoid
server disconnecting first) */
// if (undocumented) sysUpdateTargetStatesSecs is set, use that value,
// otherwise set to 1/3 the sysTargetOflineTimeoutSecs.
const unsigned updateTargetStatesMS =
(Config_getSysUpdateTargetStatesSecs(this->cfg) != 0)
? Config_getSysUpdateTargetStatesSecs(this->cfg) * 1000
: Config_getSysTargetOfflineTimeoutSecs(this->cfg) * 333;
Time lastMgmtInitT;
Time lastReregisterT;
Time lastDownloadNodesT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment