oVirt / vdsm

The Virtual Desktop Server Manager
GNU General Public License v2.0
160 stars 201 forks source link

Teardown replica when replication fails #400

Closed ahadas closed 1 year ago

ahadas commented 1 year ago

When disk replication fails during live storage migration, we detect it properly, fail the operation and remove the disk from the destination storage domain. However, we didn't tear down the replica on the host that executes the replication and therefore, if the removal of the destination disk was done on a different host, we had leftovers remaining on the host that executed the replication.

This patch changes the diskReplicateFinish function to tear down the replicate when the corresponding block job doesn't exist in order to prevent this scenario of having leftovers on the host that could lead to data corruption later on.

Bug-Url: https://bugzilla.redhat.com/2193392