It does not seem like the shortening of groups in the var name is standard
naming practice in hspace - correct me if I am wrong.
It's a nitpick, but can you change this? It can be done in a separate
commit to avoid rebase fun.

Otherwise LGTM


On Wed, Jun 25, 2014 at 11:23 AM, 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> This option will make hspace consider node groups as
> independent; in particular it will tell hspace not
> to consider an N+1 violation in one group a reason
> not to allocate in a different group.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  src/Ganeti/HTools/CLI.hs | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/Ganeti/HTools/CLI.hs b/src/Ganeti/HTools/CLI.hs
> index cf2f35c..6a212d4 100644
> --- a/src/Ganeti/HTools/CLI.hs
> +++ b/src/Ganeti/HTools/CLI.hs
> @@ -61,6 +61,7 @@ module Ganeti.HTools.CLI
>    , oIAllocSrc
>    , oIgnoreDyn
>    , oIgnoreNonRedundant
> +  , oIndependentGrps
>    , oInstMoves
>    , oJobDelay
>    , genOLuxiSocket
> @@ -126,6 +127,7 @@ data Options = Options
>    , optSpindleUse  :: Maybe Int      -- ^ Override for the spindle usage
>    , optDynuFile    :: Maybe FilePath -- ^ Optional file with dynamic use
> data
>    , optIgnoreDynu  :: Bool           -- ^ Do not use dynamic use data
> +  , optIndependentGrps :: Bool       -- ^ consider groups independently
>    , optMonD        :: Bool           -- ^ Query MonDs
>    , optMonDFile    :: Maybe FilePath -- ^ Optional file with data provided
>                                       -- ^ by MonDs
> @@ -181,6 +183,7 @@ defaultOptions  = Options
>    { optDataFile    = Nothing
>    , optDiskMoves   = True
>    , optInstMoves   = True
> +  , optIndependentGrps = False
>    , optDiskTemplate = Nothing
>    , optSpindleUse  = Nothing
>    , optIgnoreDynu  = False
> @@ -354,6 +357,13 @@ oIgnoreDyn =
>     "Ignore any dynamic utilisation information",
>     OptComplNone)
>
> +oIndependentGrps :: OptType
> +oIndependentGrps =
> +  (Option "" ["independent-groups"]
> +   (NoArg (\ opts -> Ok opts {optIndependentGrps = True}))
> +   "Consider groups independently",
> +   OptComplNone)
> +
>  oEvacMode :: OptType
>  oEvacMode =
>    (Option "E" ["evac-mode"]
> --
> 2.0.0.526.g5318336
>
>

Reply via email to