diff --git a/htools/hspace.hs b/htools/hspace.hs index a9148be25f9e28400a40381c103f37590d9be3cb..0ec82dccf6ddd55adaadd44532f29ecb2355786b 100644 --- a/htools/hspace.hs +++ b/htools/hspace.hs @@ -52,6 +52,7 @@ options :: [OptType] options = [ oPrintNodes , oDataFile + , oDiskTemplate , oNodeSim , oRapiMaster , oLuxiSocket @@ -61,7 +62,6 @@ options = , oIMem , oIDisk , oIVcpus - , oINodes , oMaxCpu , oMinDisk , oTieredSpec @@ -217,11 +217,13 @@ main = do let verbose = optVerbose opts ispec = optISpec opts shownodes = optShowNodes opts + disk_template = optDiskTemplate opts + req_nodes = Instance.requiredNodes disk_template (ClusterData gl fixed_nl il ctags) <- loadExternalData opts printKeys $ map (\(a, fn) -> ("SPEC_" ++ a, fn ispec)) specData - printKeys [ ("SPEC_RQN", printf "%d" (optINodes opts)) ] + printKeys [ ("SPEC_RQN", printf "%d" req_nodes) ] let num_instances = length $ Container.elems il @@ -234,7 +236,6 @@ main = do Node.name n `elem` offline_names || Node.alias n `elem` offline_names) all_nodes - req_nodes = optINodes opts m_cpu = optMcpu opts m_dsk = optMdsk opts @@ -280,7 +281,7 @@ main = do -- utility functions let iofspec spx = Instance.create "new" (rspecMem spx) (rspecDsk spx) - (rspecCpu spx) "running" [] True (-1) (-1) DTDrbd8 + (rspecCpu spx) "running" [] True (-1) (-1) disk_template exitifbad val = (case val of Bad s -> do hPrintf stderr "Failure: %s\n" s :: IO () diff --git a/man/hspace.rst b/man/hspace.rst index bb87e3364e68e85e40a6a11397f68412889c6a92..22514254d56cb44b6116aa5d013e3e9c327a4b05 100644 --- a/man/hspace.rst +++ b/man/hspace.rst @@ -31,7 +31,7 @@ Request options: **[--memory** *mem* **]** **[--disk** *disk* **]** -**[--req-nodes** *req-nodes* **]** +**[--disk-template** *template* **]** **[--vcpus** *vcpus* **]** **[--tiered-alloc** *spec* **]** @@ -46,7 +46,7 @@ while maintaining N+1 status. The program will try to place instances, all of the same size, on the cluster, until the point where we don't have any N+1 possible allocation. It uses the exact same allocation algorithm as the hail -iallocator plugin. +iallocator plugin in *allocate* mode. The output of the program is designed to interpreted as a shell fragment (or parsed as a *key=value* file). Options which extend the @@ -191,9 +191,9 @@ The options that can be passed to the program are as follows: --disk *disk* The disk size of the instances to be placed (defaults to 100GiB). ---req-nodes *num-nodes* - The number of nodes for the instances; the default of two means - mirrored instances, while passing one means plain type instances. +--disk-template *template* + The disk template for the instance; one of the Ganeti disk templates + (e.g. plain, drbd, so on) should be passed in. --vcpus *vcpus* The number of VCPUs of the instances to be placed (defaults to 1).