Commit ad756c77 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Add opcode parameter for the maximal number of running jobs



This parameter of OpClusterSetParams  will allow to set the
maximal number of jobs to be run simultaneously.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent cf048aea
......@@ -1331,6 +1331,9 @@ class LUClusterSetParams(LogicalUnit):
# we need to update the pool size here, otherwise the save will fail
AdjustCandidatePool(self, [], feedback_fn)
if self.op.max_running_jobs is not None:
self.cluster.max_running_jobs = self.op.max_running_jobs
if self.op.maintain_node_health is not None:
if self.op.maintain_node_health and not constants.ENABLE_CONFD:
feedback_fn("Note: CONFD was disabled at build time, node health"
......
......@@ -215,6 +215,7 @@ $(genOpCode "OpCode"
, pClusterOsParams
, pDiskParams
, pCandidatePoolSize
, pMaxRunningJobs
, pUidPool
, pAddUids
, pRemoveUids
......
......@@ -119,6 +119,7 @@ module Ganeti.OpParams
, pClusterOsParams
, pInstOsParams
, pCandidatePoolSize
, pMaxRunningJobs
, pUidPool
, pAddUids
, pRemoveUids
......@@ -628,6 +629,11 @@ pCandidatePoolSize =
withDoc "Master candidate pool size" .
optionalField $ simpleField "candidate_pool_size" [t| Positive Int |]
pMaxRunningJobs :: Field
pMaxRunningJobs =
withDoc "Maximal number of jobs to run simultaneously" .
optionalField $ simpleField "max_running_jobs" [t| Positive Int |]
pUidPool :: Field
pUidPool =
withDoc "Set UID pool, must be list of lists describing UID ranges\
......
......@@ -176,6 +176,7 @@ instance Arbitrary OpCodes.OpCode where
genMaybe genEmptyContainer <*> emptyMUD <*>
genMaybe genEmptyContainer <*> genMaybe genEmptyContainer <*>
genMaybe genEmptyContainer <*> genMaybe arbitrary <*>
genMaybe arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*>
arbitrary <*> arbitrary <*> arbitrary <*>
emptyMUD <*> emptyMUD <*> arbitrary <*>
......
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