When converting an instance from plain to DRBD, a scondary
node has to be chosen. Extend the IAllocator protocol, in a
backward compatible manner, to be aware of this situation,
make hail impement the extension, and make gnt-instance modify
-t drbd make it use.

Fixes issue 992.

Klaus Aehlig (9):
  Declare new IAllocator mode allocate-secondary
  Add a function to find a suitable secondary
  Make hail aware of secondary allocation requests
  Add a test for allocate-secondary requests
  Extend python IAllocator interface by allocate-secondary
  Extend OpInstanceSetParams by IAllocator option
  Support iallocator in LUInstanceSetParams
  Support -I option in gnt-instance modify
  Mention IAllocator protocol extension in NEWS

 Makefile.am                                    |   2 +
 NEWS                                           |   9 +
 lib/client/gnt_instance.py                     |  11 +-
 lib/cmdlib/instance_set_params.py              |  44 +++-
 lib/masterd/iallocator.py                      |  17 ++
 src/Ganeti/Constants.hs                        |   4 +
 src/Ganeti/HTools/Backend/IAlloc.hs            |  23 ++
 src/Ganeti/HTools/Cluster/AllocateSecondary.hs |  70 ++++++
 src/Ganeti/HTools/Loader.hs                    |   3 +
 src/Ganeti/OpCodes.hs                          |   1 +
 src/Ganeti/Types.hs                            |   1 +
 test/data/htools/hail-alloc-secondary.json     | 298 +++++++++++++++++++++++++
 test/hs/Test/Ganeti/OpCodes.hs                 |   1 +
 test/hs/shelltests/htools-hail.test            |   5 +
 test/py/cmdlib/instance_unittest.py            |   7 +-
 15 files changed, 478 insertions(+), 18 deletions(-)
 create mode 100644 src/Ganeti/HTools/Cluster/AllocateSecondary.hs
 create mode 100644 test/data/htools/hail-alloc-secondary.json

-- 
2.2.0.rc0.207.ga3a616c

Reply via email to