Revision f5bfed26

b/lib/constants.py
667 667
DEFAULT_MAC_PREFIX = "aa:00:00"
668 668
# default maximum instance wait time, in seconds.
669 669
DEFAULT_SHUTDOWN_TIMEOUT = 120
670
NODE_MAX_CLOCK_SKEW = 150
670
NODE_MAX_CLOCK_SKEW = _constants.NODE_MAX_CLOCK_SKEW
671 671
# Time for an intra-cluster disk transfer to wait for a connection
672 672
DISK_TRANSFER_CONNECT_TIMEOUT = 60
673 673
# Disk index separator
......
2141 2141
 ) = range(5)
2142 2142

  
2143 2143
# A few common errors for confd
2144
CONFD_ERROR_UNKNOWN_ENTRY = 1
2145
CONFD_ERROR_INTERNAL = 2
2146
CONFD_ERROR_ARGUMENT = 3
2144
CONFD_ERROR_UNKNOWN_ENTRY = _constants.CONFD_ERROR_UNKNOWN_ENTRY
2145
CONFD_ERROR_INTERNAL = _constants.CONFD_ERROR_INTERNAL
2146
CONFD_ERROR_ARGUMENT = _constants.CONFD_ERROR_ARGUMENT
2147 2147

  
2148 2148
# Each request is "salted" by the current timestamp.
2149 2149
# This constants decides how many seconds of skew to accept.
2150 2150
# TODO: make this a default and allow the value to be more configurable
2151
CONFD_MAX_CLOCK_SKEW = 2 * NODE_MAX_CLOCK_SKEW
2151
CONFD_MAX_CLOCK_SKEW = _constants.CONFD_MAX_CLOCK_SKEW
2152 2152

  
2153 2153
# When we haven't reloaded the config for more than this amount of
2154 2154
# seconds, we force a test to see if inotify is betraying us. Using a
2155 2155
# prime number to ensure we get less chance of 'same wakeup' with
2156 2156
# other processes.
2157
CONFD_CONFIG_RELOAD_TIMEOUT = 17
2157
CONFD_CONFIG_RELOAD_TIMEOUT = _constants.CONFD_CONFIG_RELOAD_TIMEOUT
2158 2158

  
2159 2159
# If we receive more than one update in this amount of microseconds,
2160 2160
# we move to polling every RATELIMIT seconds, rather than relying on
2161 2161
# inotify, to be able to serve more requests.
2162
CONFD_CONFIG_RELOAD_RATELIMIT = 250000
2162
CONFD_CONFIG_RELOAD_RATELIMIT = _constants.CONFD_CONFIG_RELOAD_RATELIMIT
2163 2163

  
2164 2164
# Magic number prepended to all confd queries.
2165 2165
# This allows us to distinguish different types of confd protocols and handle
2166 2166
# them. For example by changing this we can move the whole payload to be
2167 2167
# compressed, or move away from json.
2168
CONFD_MAGIC_FOURCC = "plj0"
2168
CONFD_MAGIC_FOURCC = _constants.CONFD_MAGIC_FOURCC
2169 2169

  
2170 2170
# By default a confd request is sent to the minimum between this number and all
2171 2171
# MCs. 6 was chosen because even in the case of a disastrous 50% response rate,
2172 2172
# we should have enough answers to be able to compare more than one.
2173
CONFD_DEFAULT_REQ_COVERAGE = 6
2173
CONFD_DEFAULT_REQ_COVERAGE = _constants.CONFD_DEFAULT_REQ_COVERAGE
2174 2174

  
2175 2175
# Timeout in seconds to expire pending query request in the confd client
2176 2176
# library. We don't actually expect any answer more than 10 seconds after we
2177 2177
# sent a request.
2178
CONFD_CLIENT_EXPIRE_TIMEOUT = 10
2178
CONFD_CLIENT_EXPIRE_TIMEOUT = _constants.CONFD_CLIENT_EXPIRE_TIMEOUT
2179 2179

  
2180 2180
# Maximum UDP datagram size.
2181 2181
# On IPv4: 64K - 20 (ip header size) - 8 (udp header size) = 65507

Also available in: Unified diff