This patch series add shared storage support in htools. There are many small changes, but all should be quite logical.
The unittests pass after this across all disk templates, and coverage has improved a bit (some new code paths are tested). Note that I didn't have access to a cluster with shared storage while writing this, just to saved input data (text files & iallocator requests), so there might still be some issues when actually tying together ganeti and htools. However, I think the basis is good enough for now. I'll send updates to the NEWS file and stuff after this has been reviewed. Iustin Pop (28): Handle nodes without local storage Do not rely on no-secondary for movable tests Mark Rbd as a movable disk template Small simplification in tryBalance Add a helper type and function for the mirror type Fix printSolutionLine to handle non-DRBD steps Fix printSolutionLine to handle big scores iPolicy: enable by default all storage templates Use the mirror type in Cluster.possibleMoves Extend the possible move types with FailoverToAny Fix Node_addPriFD test for arbitrary disk templates Split the Node_addOffline test into pri/sec Fix the Node_rMem test to specify DRBD8 templates Fix test Node_addSec_idempotent Fix a few tests that hard-coded the number of nodes Add a simple type alias for nicer type signatures Rework evacDrbdSecondaryInner to take the imove Abstract the secondary evac into a separate function Rename evacDrbdSecondaryInner to evacOneNodeInner Replace explicit case with 'either' Enable evacuation/relocation for shared storage Small improvement for nicer unit-testing Fix up Cluster nodeEvac unittests for shared storage Fix IAlloc.processRelocate to support shared storage Fix relocation test ClusterAllocRelocate Enable all disk templates in unit-tests Fix TLMigrateInstance use of IAllocator Add a helper function for mirrorType computations Makefile.am | 1 + doc/iallocator.rst | 8 +- htools/Ganeti/HTools/Cluster.hs | 197 ++++++++++++++++++++++++-------------- htools/Ganeti/HTools/IAlloc.hs | 39 ++++++-- htools/Ganeti/HTools/Instance.hs | 12 ++- htools/Ganeti/HTools/Loader.hs | 3 +- htools/Ganeti/HTools/Node.hs | 16 ++- htools/Ganeti/HTools/QC.hs | 92 ++++++++++++------ htools/Ganeti/HTools/Types.hs | 22 ++++- lib/cmdlib.py | 4 +- 10 files changed, 268 insertions(+), 126 deletions(-) -- 1.7.9.1
