ganeti
Safe HaskellNone

Ganeti.HTools.Cluster.Utils

Description

Utility functions for cluster operations

Synopsis

Documentation

splitCluster :: List -> List -> [(Gdx, (List, List))] Source #

Splits a cluster into the component node groups.

iMoveToJob Source #

Arguments

:: List

The node list; only used for node names, so any version is good (before or after the operation)

-> List

The instance list; also used for names only

-> Idx

The index of the instance being moved

-> IMove

The actual move to be described

-> [OpCode]

The list of opcodes equivalent to the given move

Convert a placement into a list of OpCodes (basically a job).

instancePriGroup :: List -> Instance -> Gdx Source #

Computes the group of an instance per the primary node.

availableGroupNodes Source #

Arguments

:: [(Gdx, [Ndx])]

Group index/node index assoc list

-> IntSet

Nodes that are excluded

-> Gdx

The group for which we query the nodes

-> Result [Ndx]

List of available node indices

Computes the nodes in a given group which are available for allocation.