Revision 61e32567 src/Ganeti/HsConstants.hs
b/src/Ganeti/HsConstants.hs | ||
---|---|---|
425 | 425 |
maxTagsPerObj :: Int |
426 | 426 |
maxTagsPerObj = 4096 |
427 | 427 |
|
428 |
-- | Node clock skew in seconds |
|
429 |
nodeMaxClockSkew :: Int |
|
430 |
nodeMaxClockSkew = 150 |
|
431 |
|
|
428 | 432 |
-- * Reboot types |
429 | 433 |
|
430 | 434 |
instanceRebootSoft :: String |
... | ... | |
1098 | 1102 |
elogJqueueTest :: String |
1099 | 1103 |
elogJqueueTest = Types.eLogTypeToRaw ELogJqueueTest |
1100 | 1104 |
|
1105 |
-- * A few common errors for confd |
|
1106 |
|
|
1107 |
confdErrorArgument :: Int |
|
1108 |
confdErrorArgument = 3 |
|
1109 |
|
|
1110 |
confdErrorInternal :: Int |
|
1111 |
confdErrorInternal = 2 |
|
1112 |
|
|
1113 |
confdErrorUnknownEntry :: Int |
|
1114 |
confdErrorUnknownEntry = 1 |
|
1115 |
|
|
1116 |
-- | Each request is "salted" by the current timestamp. |
|
1117 |
-- |
|
1118 |
-- This constant decides how many seconds of skew to accept. |
|
1119 |
-- |
|
1120 |
-- TODO: make this a default and allow the value to be more |
|
1121 |
-- configurable |
|
1122 |
confdMaxClockSkew :: Int |
|
1123 |
confdMaxClockSkew = 2 * nodeMaxClockSkew |
|
1124 |
|
|
1125 |
-- | When we haven't reloaded the config for more than this amount of |
|
1126 |
-- seconds, we force a test to see if inotify is betraying us. Using a |
|
1127 |
-- prime number to ensure we get less chance of 'same wakeup' with |
|
1128 |
-- other processes. |
|
1129 |
confdConfigReloadTimeout :: Int |
|
1130 |
confdConfigReloadTimeout = 17 |
|
1131 |
|
|
1132 |
-- | If we receive more than one update in this amount of |
|
1133 |
-- microseconds, we move to polling every RATELIMIT seconds, rather |
|
1134 |
-- than relying on inotify, to be able to serve more requests. |
|
1135 |
confdConfigReloadRatelimit :: Int |
|
1136 |
confdConfigReloadRatelimit = 250000 |
|
1137 |
|
|
1138 |
-- | Magic number prepended to all confd queries. |
|
1139 |
-- |
|
1140 |
-- This allows us to distinguish different types of confd protocols |
|
1141 |
-- and handle them. For example by changing this we can move the whole |
|
1142 |
-- payload to be compressed, or move away from json. |
|
1143 |
confdMagicFourcc :: String |
|
1144 |
confdMagicFourcc = "plj0" |
|
1145 |
|
|
1146 |
-- | By default a confd request is sent to the minimum between this |
|
1147 |
-- number and all MCs. 6 was chosen because even in the case of a |
|
1148 |
-- disastrous 50% response rate, we should have enough answers to be |
|
1149 |
-- able to compare more than one. |
|
1150 |
confdDefaultReqCoverage :: Int |
|
1151 |
confdDefaultReqCoverage = 6 |
|
1152 |
|
|
1153 |
-- | Timeout in seconds to expire pending query request in the confd |
|
1154 |
-- client library. We don't actually expect any answer more than 10 |
|
1155 |
-- seconds after we sent a request. |
|
1156 |
confdClientExpireTimeout :: Int |
|
1157 |
confdClientExpireTimeout = 10 |
|
1158 |
|
|
1101 | 1159 |
-- * Possible values for NodeGroup.alloc_policy |
1102 | 1160 |
|
1103 | 1161 |
allocPolicyLastResort :: String |
Also available in: Unified diff