History | View | Annotate | Download (12.9 kB)
Do not rely on no-secondary for movable tests
Currently, the code in Loader.hs marks as un-movable any instanceswhich don't have a secondary. This is not valid for any shared storagetemplates, so let's remove that check completely. The initial state of...
Shorten some function names
Since we use the functions always module-qualified, let's drop the`instance` prefix and use a shorter one.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Add a complex allocation/serialisation/load test
This is unfortunately a complex test that checks if:
- starting from a empty cluster- allocating a few instances on it- serialising it via the Text backend- loading it back into internal data structures...
Add a helper function for 'not offline' instances
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
Set group policy on nodes
In order to be able to use the group policy during allocation, we havea few choices:
- pass the group policy as a separate argument to all involved functions, or- add the policy as an attribute to nodes, or- add the group (not only the group index) as an attribute to nodes...
A trivial optimisation in Loader.mergeData
During loading, we can eliminate some intermediate datastructures. This only matters for big clusters, and even there it'sless than 1% less memory allocated, but still, it's a no-brainer.
Signed-off-by: Iustin Pop <iustin@google.com>...
Extend ClusterData with the cluster instance policy
This attribute is always initialised to the default, and is not (yet)read/saved in the various backends.
Cleanup hlint errors
First, we update the recommended hlint version to what I used to get aclean output (1.8.15). Most of the changes are:
- remove unneeded parentheses- some simplifications (intercalate " " → unwords, maybe … id → fromMaybe, etc.)- removal of some duplicate code (in previous patches)...
Merge branch 'devel-2.5'
htools: reindent the rest of the files
htools: rework message display construction
While diagnosing some (unrelated) memory usage in htools, I'vestumbled upon some very bad behaviour in checkData: mapAccum isnon-strict, and the tuple we use also, so that results in the list oflist of messages being very bad space-wise (hundreds of MB of memory...
htools: change behaviour for offline instances
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
htools: remove 'running' from instance options
Dots in docstings and hlint error fixes for htools
Signed-off-by: Agata Murawska <agatamurawska@google.com>Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Revert deprecation of evacuate mode in hail
As discussed offline, the new node-change mode could be used forevacuation, but it's not directly useful as it returns a list ofopcodes; therefore, we need to partially revert commits fbe5fcf and5b53ca7 that removed it (and multi-evacuate, which remains removed)....
htools: a few more hlint fixes
Tested only on GHC 7.x, will test on 6.1x too before commit.
Do proper name lookup for the -O option
hspace and hbal treat -O differently, and use aliases for short names(although hbal succeeds in that, and hspace doesn't). Uniform this witha name lookup, using the same functions we used for instanceselection/exclusion....
htools: remove ialloc/relocate and multi-evacuate
Since the new node-evacuate mode does both their work and alsosupports better multi-group clusters (including handling splitinstances).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
htools: add ChangeGroup to IAllocator types/loader
This patch updates the types and functions in IAllocator.hs andLoader.hs to the new design changes (elimination of multi-relocatemode and replacement with change-group).
It also removes an extra re-export of EvacMode from Loader.hs....
htools: lookup instance names in select/exclude
Currently we just match the passed name with fqdns. With this change wedo a proper search for either the fqdn or the initial name component, asin Ganeti itself.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
htools: infrastructure for looking up names
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
htools: introduce new data type for node-evac
The evac-mode goes into the Types.hs module since it needs to beavailable to Cluster.hs too.
htools: docstring fixes and improvements
No code changes (except one definition being moved around in QC.hs)are contained in this patch.
Check that the selected instances are known
Loader.updateMovable: evaluate selected instances
This also adds docstrings for the function arguments and renames exinstto exinsts, which is how it is called in other functions, since it's alist.
Add instance selection list to Loader.mergeData
hail: add new data types for the multi-reloc mode
Fix some lint warnings in htools code
hlint gives more suggestions, but some make the code (IMHO) harder toread.
Merge remote branch 'htools/master'