Skip to content

Commit

Permalink
Merge pull request #377 from red-hat-storage/sync_us--devel
Browse files Browse the repository at this point in the history
Syncing latest changes from upstream devel for ceph-csi
  • Loading branch information
openshift-merge-bot[bot] authored Sep 12, 2024
2 parents fadfdf8 + 61c23dd commit 0fb963a
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 0fb963a

Please sign in to comment.