Bug 2166708

Summary: [dashboard] block/rbd : images -> edit -> disable checkboxes for layering and deef-flatten on pre-created image
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: Ceph-DashboardAssignee: avan <athakkar>
Status: CLOSED ERRATA QA Contact: Sunil Angadi <sangadi>
Severity: medium Docs Contact: Rivka Pollack <rpollack>
Priority: unspecified    
Version: 6.0CC: akraj, athakkar, ceph-eng-bugs, cephqe-warriors, kdreyer, nia, sangadi, sostapov, tserlin
Target Milestone: ---   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-18.2.0-19.el9cp Doc Type: Bug Fix
Doc Text:
.Edit layering and deep-flatten features disabled on the Dashboard. Previously, in the Ceph dashboard, it was possible to allow editing the layering & deep-flatten features, which are immutable, resulting in an error - `rbd: failed to update image features: (22) Invalid argument`. With this fix, editing the layering & deep-flatten features are disabled and everything works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-13 15:20:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2237662    

Description Vasishta 2023-02-02 17:21:01 UTC
Description of problem:
layering and deep-flatten features are immutable (cannot be enabled after creating the image)

# rbd feature enable MCzUHjMhPw_tier_1_rbd_mirror_pool/OLjakajjEA_tier_1_rbd_mirror_image layering
rbd: failed to update image features: 2023-02-02T17:13:35.254+0000 7fcf0f1fca00 -1 librbd::Operations: cannot update immutable features
(22) Invalid argument

# rbd feature enable MCzUHjMhPw_tier_1_rbd_mirror_pool/OLjakajjEA_tier_1_rbd_mirror_image deep-flatten
rbd: failed to update image features: (22) Invalid argument
2023-02-02T17:14:49.922+0000 7fa1afc2ba00 -1 librbd::Operations: cannot update immutable features

Dashboard not only allows to click on these checkboxes but returns green (success) notification when users click on edit RBD

Version-Release number of selected component (if applicable):
6.0 latest

How reproducible:
Always

Steps to Reproduce:
1. Create an rbd image without layering, deepflatten feature
2. edit rbd image on dashboard
3. select layering and deep-flatted and click on edit rbd

Actual results:
Dashboard not only allows to click on these checkboxes but returns green (success) notification when users click on edit RBD

Expected results:
Either disable checkboxes for them to edit or return error message as in CLI

Additional info:

Comment 1 Scott Ostapovicz 2023-07-12 13:05:18 UTC
Missed the 6.1 z1 window.  Retargeted to 6.1 z2.

Comment 8 errata-xmlrpc 2023-12-13 15:20:06 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 (Red Hat Ceph Storage 7.0 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/RHBA-2023:7780