Skip to content

Commit

Permalink
Merge pull request #379 from red-hat-storage/sync_ds--devel
Browse files Browse the repository at this point in the history
Syncing latest changes from devel for ceph-csi
  • Loading branch information
openshift-merge-bot[bot] authored Sep 13, 2024
2 parents 2bfa3e9 + 0fb963a commit 097435c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/rbd/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ func DisableVolumeReplication(mirror types.Mirror,
return fmt.Errorf("failed to get mirroring info of image: %w", err)
}

if info.GetState() == librbd.MirrorImageDisabling.String() {
return fmt.Errorf("%w: image is in disabling state", ErrAborted)
// error out if the image is not in disabled state.
if info.GetState() != librbd.MirrorImageDisabled.String() {
return fmt.Errorf("%w: image is in %q state, expected state %q", ErrAborted,
info.GetState(), librbd.MirrorImageDisabled.String())
}

return nil
Expand Down

0 comments on commit 097435c

Please sign in to comment.