This is a first part of the implementation of the shared-storage N+1 redundancy design. As global operations like balanching will eventually use the global N+1 redundancy check, we organise the code such that this function does not depend on Ganeti.HTools.Cluster. This requires splitting off submodules of that module with the functionality needed for this task. This is done in the first part of this patch series. Splitting up that huge module is a good thing to do anyway.
Klaus Aehlig (7): Move cluster moves to a separate module Add a variant of applyMoveEx suitable for foldM Move cluster metrics to a separate module Move node evacuation to a separate module Add a predicate testing if a node is globally N+1 redundant Make hcheck also check global N+1 redundancy Add a test for N+1 failure with shared storage Makefile.am | 8 + src/Ganeti/HTools/Backend/IAlloc.hs | 17 +- src/Ganeti/HTools/Cluster.hs | 769 +------------------------------- src/Ganeti/HTools/Cluster/Evacuate.hs | 411 +++++++++++++++++ src/Ganeti/HTools/Cluster/Metrics.hs | 221 +++++++++ src/Ganeti/HTools/Cluster/Moves.hs | 188 ++++++++ src/Ganeti/HTools/Cluster/Utils.hs | 150 +++++++ src/Ganeti/HTools/Dedicated.hs | 3 +- src/Ganeti/HTools/GlobalN1.hs | 85 ++++ src/Ganeti/HTools/Loader.hs | 3 +- src/Ganeti/HTools/Program/Hbal.hs | 12 +- src/Ganeti/HTools/Program/Hcheck.hs | 16 +- src/Ganeti/HTools/Program/Hinfo.hs | 10 +- src/Ganeti/HTools/Program/Hscan.hs | 3 +- src/Ganeti/HTools/Program/Hspace.hs | 7 +- src/Ganeti/HTools/Program/Hsqueeze.hs | 3 +- test/data/htools/shared-n1-failure.data | 20 + test/hs/Test/Ganeti/HTools/Cluster.hs | 21 +- test/hs/shelltests/htools-hbal.test | 18 + test/hs/shelltests/htools-hcheck.test | 7 + 20 files changed, 1178 insertions(+), 794 deletions(-) create mode 100644 src/Ganeti/HTools/Cluster/Evacuate.hs create mode 100644 src/Ganeti/HTools/Cluster/Metrics.hs create mode 100644 src/Ganeti/HTools/Cluster/Moves.hs create mode 100644 src/Ganeti/HTools/Cluster/Utils.hs create mode 100644 src/Ganeti/HTools/GlobalN1.hs create mode 100644 test/data/htools/shared-n1-failure.data create mode 100644 test/hs/shelltests/htools-hcheck.test -- 2.2.0.rc0.207.ga3a616c
