Revision 3b170ad4
b/src/Ganeti/HsConstants.hs | ||
---|---|---|
40 | 40 |
import qualified Data.Map as Map (fromList) |
41 | 41 |
|
42 | 42 |
import AutoConf |
43 |
import Ganeti.ConstantUtils (FrozenSet, Protocol(..)) |
|
43 |
import Ganeti.ConstantUtils (FrozenSet, Protocol(..), buildVersion)
|
|
44 | 44 |
import qualified Ganeti.ConstantUtils as ConstantUtils |
45 | 45 |
import Ganeti.Runtime (GanetiDaemon(..), MiscGroup(..), GanetiGroup(..), |
46 | 46 |
ExtraLogReason(..)) |
... | ... | |
50 | 50 |
import Ganeti.Types |
51 | 51 |
import qualified Ganeti.Types as Types |
52 | 52 |
|
53 |
-- * 'autoconf' constants for Python only |
|
54 |
|
|
55 |
drbdBarriers :: String |
|
56 |
drbdBarriers = AutoConf.drbdBarriers |
|
57 |
|
|
58 |
drbdNoMetaFlush :: Bool |
|
59 |
drbdNoMetaFlush = AutoConf.drbdNoMetaFlush |
|
60 |
|
|
61 |
lvmStripecount :: Int |
|
62 |
lvmStripecount = AutoConf.lvmStripecount |
|
63 |
|
|
64 |
-- * Various versions |
|
65 |
|
|
66 |
releaseVersion :: String |
|
67 |
releaseVersion = AutoConf.packageVersion |
|
68 |
|
|
69 |
configMajor :: Int |
|
70 |
configMajor = AutoConf.versionMajor |
|
71 |
|
|
72 |
configMinor :: Int |
|
73 |
configMinor = AutoConf.versionMinor |
|
74 |
|
|
75 |
-- | The configuration is supposed to remain stable across |
|
76 |
-- revisions. Therefore, the revision number is cleared to '0'. |
|
77 |
configRevision :: Int |
|
78 |
configRevision = 0 |
|
79 |
|
|
80 |
configVersion :: Int |
|
81 |
configVersion = buildVersion configMajor configMinor configRevision |
|
82 |
|
|
83 |
-- | Similarly to the configuration (see 'configRevision'), the |
|
84 |
-- protocols are supposed to remain stable across revisions. |
|
85 |
protocolVersion :: Int |
|
86 |
protocolVersion = buildVersion configMajor configMinor configRevision |
|
87 |
|
|
53 | 88 |
-- * Constants for 'lib/pathutils.py' |
54 | 89 |
|
55 | 90 |
osSearchPath :: [String] |
... | ... | |
107 | 142 |
sshConsoleUser :: String |
108 | 143 |
sshConsoleUser = AutoConf.sshConsoleUser |
109 | 144 |
|
145 |
-- * 'autoconf' enable/disable |
|
146 |
|
|
147 |
enableConfd :: Bool |
|
148 |
enableConfd = AutoConf.enableConfd |
|
149 |
|
|
150 |
enableMond :: Bool |
|
151 |
enableMond = AutoConf.enableMond |
|
152 |
|
|
153 |
enableRestrictedCommands :: Bool |
|
154 |
enableRestrictedCommands = AutoConf.enableRestrictedCommands |
|
155 |
|
|
156 |
enableSplitQuery :: Bool |
|
157 |
enableSplitQuery = AutoConf.enableSplitQuery |
|
158 |
|
|
110 | 159 |
-- * SSH constants |
111 | 160 |
|
112 | 161 |
ssh :: String |
... | ... | |
217 | 266 |
knownXenCommands :: FrozenSet String |
218 | 267 |
knownXenCommands = ConstantUtils.mkSet [xenCmdXl, xenCmdXm] |
219 | 268 |
|
269 |
-- * KVM and socat |
|
270 |
|
|
271 |
kvmPath :: String |
|
272 |
kvmPath = AutoConf.kvmPath |
|
273 |
|
|
274 |
kvmKernel :: String |
|
275 |
kvmKernel = AutoConf.kvmKernel |
|
276 |
|
|
277 |
socatEscapeCode :: String |
|
278 |
socatEscapeCode = "0x1d" |
|
279 |
|
|
280 |
socatPath :: String |
|
281 |
socatPath = AutoConf.socatPath |
|
282 |
|
|
283 |
socatUseCompress :: Bool |
|
284 |
socatUseCompress = AutoConf.socatUseCompress |
|
285 |
|
|
286 |
socatUseEscape :: Bool |
|
287 |
socatUseEscape = AutoConf.socatUseEscape |
|
288 |
|
|
220 | 289 |
-- * Storage types |
221 | 290 |
|
222 | 291 |
stBlock :: String |
... | ... | |
429 | 498 |
nodeMaxClockSkew :: Int |
430 | 499 |
nodeMaxClockSkew = 150 |
431 | 500 |
|
501 |
-- | Disk index separator |
|
502 |
diskSeparator :: String |
|
503 |
diskSeparator = AutoConf.diskSeparator |
|
504 |
|
|
505 |
ipCommandPath :: String |
|
506 |
ipCommandPath = AutoConf.ipPath |
|
507 |
|
|
432 | 508 |
-- * Reboot types |
433 | 509 |
|
434 | 510 |
instanceRebootSoft :: String |
... | ... | |
1174 | 1250 |
blockdevDriverManual :: String |
1175 | 1251 |
blockdevDriverManual = Types.blockDriverToRaw BlockDrvManual |
1176 | 1252 |
|
1253 |
-- | 'qemu-img' path, required for 'ovfconverter' |
|
1254 |
qemuimgPath :: String |
|
1255 |
qemuimgPath = AutoConf.qemuimgPath |
|
1256 |
|
|
1257 |
-- | Whether htools was enabled at compilation time |
|
1258 |
-- |
|
1259 |
-- FIXME: this should be moved next to the other enable constants, |
|
1260 |
-- such as, 'enableConfd', and renamed to 'enableHtools'. |
|
1261 |
htools :: Bool |
|
1262 |
htools = AutoConf.htools |
|
1263 |
|
|
1177 | 1264 |
-- | Path generating random UUID |
1178 | 1265 |
randomUuidFile :: String |
1179 | 1266 |
randomUuidFile = ConstantUtils.randomUuidFile |
Also available in: Unified diff