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: ASSIGNED --- QA Contact: Sunil Angadi <sangadi>
Severity: medium Docs Contact: Anjana Suparna Sriram <asriram>
Priority: unspecified    
Version: 6.0CC: ceph-eng-bugs, cephqe-warriors, nia, sangadi, sostapov
Target Milestone: ---   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

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.