Enhance secondary node replace for drbd8
authorIustin Pop <iustin@google.com>
Wed, 7 Nov 2007 15:53:50 +0000 (15:53 +0000)
committerIustin Pop <iustin@google.com>
Wed, 7 Nov 2007 15:53:50 +0000 (15:53 +0000)
commit0834c866734043b030897730ad2fa067c6ef8d0d
treec5e27654e86f1b0f2ee8e0c57d85d591c3199f29
parente3c826ec1ec25f920d71b990437b142eee2ee5fc
Enhance secondary node replace for drbd8

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
lib/backend.py
lib/bdev.py
lib/cmdlib.py
lib/constants.py
scripts/gnt-instance