• Iustin Pop's avatar
    Fix generalized relocate mode of IAllocator · 29859cb7
    Iustin Pop authored
    The patch which generalized the IAllocator was half-true: it actually
    put the selection of the node inside the IAllocator, so callers were not
    able to specify replace primary node.
    This patch does:
      - split the arguments to the constructor in three sets: mode and name
        are always passed, and then we differentiate between allocation
        parameters and relocation ones
      - add a new relocate_from option to the IAllocator constructor which
        is a list of nodes we want to move the instance off
      - rename the 'nodes' argument in the request object to 'relocate_from'
        since this is clearer and is not confused with the result field also
        called 'nodes'
    Reviewed-by: ultrotter
cmdlib.py 172 KB