• Iustin Pop's avatar
    Enhance secondary node replace for drbd8 · 0834c866
    Iustin Pop authored
    This (big) patch does two things:
      - add "local disk status" to the block device checks
        (BlockDevice.GetSyncStatus and the rpc calls that call this
        function, and therefore cmdlib._CheckDiskConsistency)
      - improve the drbd8 secondary replace operation using the above
        functionality
    
    The "local disk status" adds a new variable to the result of
    GetSyncStatus that shows the degradation of the local storage of the
    device. Of course, not all device support this - for now, we only modify
    LogicalVolumes and DRBD8 to return degraded in some cases, other devices
    always return non-degraded. This variable should be a subset of
    is_degraded - whenever this variable is true, the is_degraded should
    also be true.
    
    The drbd8 secondary replace uses this variable as we don't care if the
    primary drbd device is network-degraded, only if it has good local disk
    data (ldisk is False).
    
    The patch also increases the protocol version (due to rpc changes).
    
    Reviewed-by: imsnah
    0834c866
constants.py 3.77 KB