mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-23 21:40:20 +00:00
rbd: reset dummy image id
dummy image rbdVolume struct is derived from the actual one rbdVolume of the volumeID sent in the EnableVolumeReplication request. and the dummy rbdVolume struct contains the image id of the actual volume because of that when we are repairing the dummy image the image is sent to trash but not deleted due to the wrong image ID. resetting the image id will makes sure the image id is fetching from ceph cluster and same image id will be used for manager operation. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
93e43d1a0f
commit
810e285c50
@ -314,6 +314,9 @@ func createDummyImage(ctx context.Context, rbdVol *rbdVolume) error {
|
||||
}
|
||||
dummyVol := *rbdVol
|
||||
dummyVol.RbdImageName = imgName
|
||||
// dummyVol holds rbdVol details, reset ImageID or else dummy image cannot be
|
||||
// deleted from trash during repair operation.
|
||||
dummyVol.ImageID = ""
|
||||
f := []string{
|
||||
librbd.FeatureNameLayering,
|
||||
librbd.FeatureNameObjectMap,
|
||||
|
Loading…
Reference in New Issue
Block a user