Commit 470c4c38 authored by Klaus Aehlig's avatar Klaus Aehlig

Extend OpClusterSetParams to allow setting maintd interval

While not technically part of the cluster configuration, OpClusterSetParams
is the best place to set and modify the maintenance interval of the maintenance
daemon. Most likely, there won't be enough tunables to justify a separate
Ganeti command.
Signed-off-by: 's avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: 's avatarPetr Pudlak <pudlak@google.com>
parent d4974938
......@@ -260,6 +260,7 @@ $(genOpCode "OpCode"
, pEnabledUserShutdown
, pEnabledDataCollectors
, pDataCollectorInterval
, pMaintdRoundDelay
],
[])
, ("OpClusterRedistConf",
......
......@@ -297,6 +297,7 @@ module Ganeti.OpParams
, pEnabledUserShutdown
, pAdminStateSource
, pEnabledDataCollectors
, pMaintdRoundDelay
, pDataCollectorInterval
, pNodeSslCerts
, pSshKeys
......@@ -1889,6 +1890,12 @@ pDataCollectorInterval =
optionalField $
simpleField C.dataCollectorsIntervalName [t| GenericContainer String Int |]
pMaintdRoundDelay :: Field
pMaintdRoundDelay =
withDoc "Minimal delay between rounds of the maintenance daemon"
. optionalField
$ simpleField "maint_round_delay" [t| Int |]
pNodeSslCerts :: Field
pNodeSslCerts =
withDoc "Whether to renew node SSL certificates" .
......@@ -1917,4 +1924,4 @@ pLongSleep :: Field
pLongSleep =
withDoc "Whether to allow long instance shutdowns during exports" .
defaultField [| False |] $
simpleField "long_sleep" [t| Bool |]
\ No newline at end of file
simpleField "long_sleep" [t| Bool |]
......@@ -251,6 +251,7 @@ instance Arbitrary OpCodes.OpCode where
<*> arbitrary -- enabled_user_shutdown
<*> genMaybe arbitraryDataCollector -- enabled_data_collectors
<*> arbitraryDataCollectorInterval -- data_collector_interval
<*> genMaybe (fromPositive <$> arbitrary) -- maintd round interval
"OP_CLUSTER_REDIST_CONF" -> pure OpCodes.OpClusterRedistConf
"OP_CLUSTER_ACTIVATE_MASTER_IP" ->
pure OpCodes.OpClusterActivateMasterIp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment