Bug 2311885 - rbd: disabling mirroring should fail if the the image is not in mirror disabled state
Summary: rbd: disabling mirroring should fail if the the image is not in mirror disabl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: csi-driver
Version: 4.17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ODF 4.17.0
Assignee: Rakshith
QA Contact: Sidhant Agrawal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-12 09:36 UTC by Rakshith
Modified: 2024-10-30 14:35 UTC (History)
4 users (show)

Fixed In Version: 4.17.0-100
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-10-30 14:35:20 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-csi pull 4832 0 None Merged rbd: fail DisableVolumeReplication() if image is not mirror disabled 2024-09-12 09:36:08 UTC
Github red-hat-storage ceph-csi pull 378 0 None open BUG 2311885: rbd: fail DisableVolumeReplication() if image is not mirror disabled 2024-09-13 01:00:46 UTC
Red Hat Issue Tracker OCSBZM-9237 0 None None None 2024-09-12 09:39:00 UTC
Red Hat Product Errata RHSA-2024:8676 0 None None None 2024-10-30 14:35:23 UTC

Description Rakshith 2024-09-12 09:36:09 UTC
Description of problem (please be detailed as possible and provide log
snippests):


CephCSI had a bug which did not check for the image to be in mirror image disabled state after disabling mirroring on it.

```
----------------------------------------------------------------------------
	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
```

This bug was fixed in https://github.com/ceph/ceph-csi/pull/4832. 


Version of all relevant components (if applicable):
4.17

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
No

Is there any workaround available to the best of your knowledge?
No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?

The issue cannot be hit easily and has not been encountered.


Validation Steps:

Running few relocation and failover attempts with multiple rbd workloads should be enough to verify this BZ.

Comment 8 errata-xmlrpc 2024-10-30 14:35:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat OpenShift Data Foundation 4.17.0 Security, Enhancement, & Bug Fix Update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2024:8676


Note You need to log in before you can comment on or make changes to this bug.