• Iustin Pop's avatar
    Allow fixing of split instances via relocate · e3a19474
    Iustin Pop authored
    Currently, the IAllocator code requests strictly that the (set of) groups of
    the nodes we're relocating from is equal to the set of groups we're
    relocating to.
    This, however, makes is impossible to fix split instances, since (by
    definition) the secondary of a split instance is not in the same group
    as the primary node, and after the fixing is it the same.
    The patch changes the test from group equality to check that the final
    group set (across both primary and secondary nodes) is a subset of the
    initial group set (again across both nodes). This means we can't
    "extend" the group of nodes but keeping the same or decreasing it is
    After this patch, one can finally fix (automatically) split instances
    via a gnt-instance replace-disks.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
cmdlib.py 471 KB