Revision 93e2e44e src/Ganeti/HsConstants.hs
b/src/Ganeti/HsConstants.hs | ||
---|---|---|
40 | 40 |
import Control.Arrow ((***)) |
41 | 41 |
import Data.List ((\\)) |
42 | 42 |
import Data.Map (Map) |
43 |
import qualified Data.Map as Map (fromList, keys, insert) |
|
43 |
import qualified Data.Map as Map (empty, fromList, keys, insert)
|
|
44 | 44 |
|
45 | 45 |
import qualified AutoConf |
46 | 46 |
import Ganeti.ConstantUtils (PythonChar(..), FrozenSet, Protocol(..), |
... | ... | |
3482 | 3482 |
ndcGlobals :: FrozenSet String |
3483 | 3483 |
ndcGlobals = ConstantUtils.mkSet [ndExclusiveStorage] |
3484 | 3484 |
|
3485 |
diskLdDefaults :: Map DiskTemplate (Map String PyValueEx) |
|
3486 |
diskLdDefaults = |
|
3487 |
Map.fromList |
|
3488 |
[ (DTDrbd8, Map.fromList |
|
3489 |
[ (ldpBarriers, PyValueEx drbdBarriers) |
|
3490 |
, (ldpDefaultMetavg, PyValueEx defaultVg) |
|
3491 |
, (ldpDelayTarget, PyValueEx (1 :: Int)) -- ds |
|
3492 |
, (ldpDiskCustom, PyValueEx "") |
|
3493 |
, (ldpDynamicResync, PyValueEx False) |
|
3494 |
, (ldpFillTarget, PyValueEx (0 :: Int)) -- sectors |
|
3495 |
, (ldpMaxRate, PyValueEx (classicDrbdSyncSpeed :: Int)) -- KiB/s |
|
3496 |
, (ldpMinRate, PyValueEx (4 * 1024 :: Int)) -- KiB/s |
|
3497 |
, (ldpNetCustom, PyValueEx "") |
|
3498 |
, (ldpNoMetaFlush, PyValueEx drbdNoMetaFlush) |
|
3499 |
-- The default values for the DRBD dynamic resync |
|
3500 |
-- speed algorithm are taken from the drbsetup 8.3.11 |
|
3501 |
-- man page, except for c-plan-ahead (that we don't |
|
3502 |
-- need to set to 0, because we have a separate option |
|
3503 |
-- to enable it) and for c-max-rate, that we cap to |
|
3504 |
-- the default value for the static resync rate. |
|
3505 |
, (ldpPlanAhead, PyValueEx (20 :: Int)) -- ds |
|
3506 |
, (ldpProtocol, PyValueEx drbdDefaultNetProtocol) |
|
3507 |
, (ldpResyncRate, PyValueEx classicDrbdSyncSpeed) |
|
3508 |
]) |
|
3509 |
, (DTPlain, Map.fromList [(ldpStripes, PyValueEx lvmStripecount)]) |
|
3510 |
, (DTFile, Map.empty) |
|
3511 |
, (DTSharedFile, Map.empty) |
|
3512 |
, (DTBlock, Map.empty) |
|
3513 |
, (DTRbd, Map.fromList |
|
3514 |
[ (ldpPool, PyValueEx "rbd") |
|
3515 |
, (ldpAccess, PyValueEx diskKernelspace) |
|
3516 |
]) |
|
3517 |
, (DTExt, Map.empty) |
|
3518 |
] |
|
3519 |
|
|
3485 | 3520 |
-- | All of the following values are quite arbitrary - there are no |
3486 | 3521 |
-- "good" defaults, these must be customised per-site |
3487 | 3522 |
ispecsMinmaxDefaults :: Map String (Map String Int) |
Also available in: Unified diff