Revision df2e0fa5 src/Ganeti/HsConstants.hs
b/src/Ganeti/HsConstants.hs | ||
---|---|---|
3505 | 3505 |
ndcGlobals :: FrozenSet String |
3506 | 3506 |
ndcGlobals = ConstantUtils.mkSet [ndExclusiveStorage] |
3507 | 3507 |
|
3508 |
-- | Default delay target measured in sectors |
|
3509 |
defaultDelayTarget :: Int |
|
3510 |
defaultDelayTarget = 1 |
|
3511 |
|
|
3512 |
defaultDiskCustom :: String |
|
3513 |
defaultDiskCustom = "" |
|
3514 |
|
|
3515 |
defaultDiskResync :: Bool |
|
3516 |
defaultDiskResync = False |
|
3517 |
|
|
3518 |
-- | Default fill target measured in sectors |
|
3519 |
defaultFillTarget :: Int |
|
3520 |
defaultFillTarget = 0 |
|
3521 |
|
|
3522 |
-- | Default mininum rate measured in KiB/s |
|
3523 |
defaultMinRate :: Int |
|
3524 |
defaultMinRate = 4 * 1024 |
|
3525 |
|
|
3526 |
defaultNetCustom :: String |
|
3527 |
defaultNetCustom = "" |
|
3528 |
|
|
3529 |
-- | Default plan ahead measured in sectors |
|
3530 |
-- |
|
3531 |
-- The default values for the DRBD dynamic resync speed algorithm are |
|
3532 |
-- taken from the drbsetup 8.3.11 man page, except for c-plan-ahead |
|
3533 |
-- (that we don't need to set to 0, because we have a separate option |
|
3534 |
-- to enable it) and for c-max-rate, that we cap to the default value |
|
3535 |
-- for the static resync rate. |
|
3536 |
defaultPlanAhead :: Int |
|
3537 |
defaultPlanAhead = 20 |
|
3538 |
|
|
3539 |
defaultRbdPool :: String |
|
3540 |
defaultRbdPool = "rbd" |
|
3541 |
|
|
3508 | 3542 |
diskLdDefaults :: Map DiskTemplate (Map String PyValueEx) |
3509 | 3543 |
diskLdDefaults = |
3510 | 3544 |
Map.fromList |
3511 |
[ (DTDrbd8, Map.fromList |
|
3512 |
[ (ldpBarriers, PyValueEx drbdBarriers) |
|
3545 |
[ (DTBlock, Map.empty) |
|
3546 |
, (DTDrbd8, Map.fromList |
|
3547 |
[ (ldpBarriers, PyValueEx drbdBarriers) |
|
3513 | 3548 |
, (ldpDefaultMetavg, PyValueEx defaultVg) |
3514 |
, (ldpDelayTarget, PyValueEx (1 :: Int)) -- ds |
|
3515 |
, (ldpDiskCustom, PyValueEx "") |
|
3516 |
, (ldpDynamicResync, PyValueEx False) |
|
3517 |
, (ldpFillTarget, PyValueEx (0 :: Int)) -- sectors |
|
3518 |
, (ldpMaxRate, PyValueEx (classicDrbdSyncSpeed :: Int)) -- KiB/s |
|
3519 |
, (ldpMinRate, PyValueEx (4 * 1024 :: Int)) -- KiB/s |
|
3520 |
, (ldpNetCustom, PyValueEx "") |
|
3521 |
, (ldpNoMetaFlush, PyValueEx drbdNoMetaFlush) |
|
3522 |
-- The default values for the DRBD dynamic resync |
|
3523 |
-- speed algorithm are taken from the drbsetup 8.3.11 |
|
3524 |
-- man page, except for c-plan-ahead (that we don't |
|
3525 |
-- need to set to 0, because we have a separate option |
|
3526 |
-- to enable it) and for c-max-rate, that we cap to |
|
3527 |
-- the default value for the static resync rate. |
|
3528 |
, (ldpPlanAhead, PyValueEx (20 :: Int)) -- ds |
|
3529 |
, (ldpProtocol, PyValueEx drbdDefaultNetProtocol) |
|
3530 |
, (ldpResyncRate, PyValueEx classicDrbdSyncSpeed) |
|
3549 |
, (ldpDelayTarget, PyValueEx defaultDelayTarget) |
|
3550 |
, (ldpDiskCustom, PyValueEx defaultDiskCustom) |
|
3551 |
, (ldpDynamicResync, PyValueEx defaultDiskResync) |
|
3552 |
, (ldpFillTarget, PyValueEx defaultFillTarget) |
|
3553 |
, (ldpMaxRate, PyValueEx classicDrbdSyncSpeed) |
|
3554 |
, (ldpMinRate, PyValueEx defaultMinRate) |
|
3555 |
, (ldpNetCustom, PyValueEx defaultNetCustom) |
|
3556 |
, (ldpNoMetaFlush, PyValueEx drbdNoMetaFlush) |
|
3557 |
, (ldpPlanAhead, PyValueEx defaultPlanAhead) |
|
3558 |
, (ldpProtocol, PyValueEx drbdDefaultNetProtocol) |
|
3559 |
, (ldpResyncRate, PyValueEx classicDrbdSyncSpeed) |
|
3531 | 3560 |
]) |
3532 |
, (DTPlain, Map.fromList [(ldpStripes, PyValueEx lvmStripecount)])
|
|
3561 |
, (DTExt, Map.empty)
|
|
3533 | 3562 |
, (DTFile, Map.empty) |
3534 |
, (DTSharedFile, Map.empty) |
|
3535 |
, (DTBlock, Map.empty) |
|
3563 |
, (DTPlain, Map.fromList [(ldpStripes, PyValueEx lvmStripecount)]) |
|
3536 | 3564 |
, (DTRbd, Map.fromList |
3537 |
[ (ldpPool, PyValueEx "rbd")
|
|
3565 |
[ (ldpPool, PyValueEx defaultRbdPool)
|
|
3538 | 3566 |
, (ldpAccess, PyValueEx diskKernelspace) |
3539 | 3567 |
]) |
3540 |
, (DTExt, Map.empty) |
|
3568 |
, (DTSharedFile, Map.empty) |
|
3569 |
] |
|
3570 |
|
|
3571 |
diskDtDefaults :: Map DiskTemplate (Map String PyValueEx) |
|
3572 |
diskDtDefaults = |
|
3573 |
Map.fromList |
|
3574 |
[ (DTBlock, Map.empty) |
|
3575 |
, (DTDiskless, Map.empty) |
|
3576 |
, (DTDrbd8, Map.fromList |
|
3577 |
[ (drbdDataStripes, PyValueEx lvmStripecount) |
|
3578 |
, (drbdDefaultMetavg, PyValueEx defaultVg) |
|
3579 |
, (drbdDelayTarget, PyValueEx defaultDelayTarget) |
|
3580 |
, (drbdDiskBarriers, PyValueEx drbdBarriers) |
|
3581 |
, (drbdDiskCustom, PyValueEx defaultDiskCustom) |
|
3582 |
, (drbdDynamicResync, PyValueEx defaultDiskResync) |
|
3583 |
, (drbdFillTarget, PyValueEx defaultFillTarget) |
|
3584 |
, (drbdMaxRate, PyValueEx classicDrbdSyncSpeed) |
|
3585 |
, (drbdMetaBarriers, PyValueEx drbdNoMetaFlush) |
|
3586 |
, (drbdMetaStripes, PyValueEx lvmStripecount) |
|
3587 |
, (drbdMinRate, PyValueEx defaultMinRate) |
|
3588 |
, (drbdNetCustom, PyValueEx defaultNetCustom) |
|
3589 |
, (drbdPlanAhead, PyValueEx defaultPlanAhead) |
|
3590 |
, (drbdProtocol, PyValueEx drbdDefaultNetProtocol) |
|
3591 |
, (drbdResyncRate, PyValueEx classicDrbdSyncSpeed) |
|
3592 |
]) |
|
3593 |
, (DTExt, Map.empty) |
|
3594 |
, (DTFile, Map.empty) |
|
3595 |
, (DTPlain, Map.fromList [(lvStripes, PyValueEx lvmStripecount)]) |
|
3596 |
, (DTRbd, Map.fromList |
|
3597 |
[ (rbdPool, PyValueEx defaultRbdPool) |
|
3598 |
, (rbdAccess, PyValueEx diskKernelspace) |
|
3599 |
]) |
|
3600 |
, (DTSharedFile, Map.empty) |
|
3541 | 3601 |
] |
3542 | 3602 |
|
3543 | 3603 |
niccDefaults :: Map String PyValueEx |
Also available in: Unified diff