replication: interrupt failover if the main device is closed
Without this change, there is a race condition in tests/test-replication. Depending on how fast the failover job (active commit) runs, there is a chance of two bad things happening: 1) replication_done can be called after the secondary has been closed and hence when the BDRVReplicationState is not valid anymore. 2) two copies of the active disk are present during the /replication/secondary/stop test (that test runs immediately after /replication/secondary/start, which tests failover). This causes the corruption detector to fire. Reviewed-by: NWen Congyang <wency@cn.fujitsu.com> Reviewed-by: NChanglong Xie <xiecl.fnst@cn.fujitsu.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-Id: <1477565348-5458-2-git-send-email-pbonzini@redhat.com> Signed-off-by: NFam Zheng <famz@redhat.com>
Showing
想要评论请 注册 或 登录