• Iustin Pop's avatar
    Fix bug in recreate-disks for DRBD instances · b768099e
    Iustin Pop authored
    
    
    The new functionality in 2.4.2 for recreate-disks to change nodes is
    broken for DRBD instances: it simply changes the nodes without caring
    for the DRBD minors mapping, which will lead to conflicts in non-empty
    clusters.
    
    This patch changes Exec() method of this LU significantly, to both fix
    the DRBD minor usage and make sure that we don't have partial
    modification to the instance objects:
    
    - the first half of the method makes all the checks and computes the
      needed configuration changes
    - the second half then performs the configuration changes and
      recreates the disks
    
    This way, instances will either be fully modified or not at all;
    whether the disks are successfully recreate is another point, but at
    least we'll have the configuration sane.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    b768099e
cmdlib.py 407 KB