Bug 1958679

Summary: Compression on pool can't be disabled via UI
Product: OpenShift Container Platform Reporter: Shay Rozen <srozen>
Component: Console Storage PluginAssignee: Sanjal Katiyar <skatiyar>
Status: CLOSED ERRATA QA Contact: Shay Rozen <srozen>
Severity: high Docs Contact:
Priority: high    
Version: 4.7CC: afrahman, aos-bugs, jefbrown, madam, nberry, nthomas, ocs-bugs, skatiyar
Target Milestone: ---   
Target Release: 4.8.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: 2021-07-27 23:07:32 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:
Attachments:
Description Flags
Rook log none

Description Shay Rozen 2021-05-09 17:54:05 UTC
Created attachment 1781354 [details]
Rook log

Created attachment 1781354 [details]
Rook log

Description of problem (please be detailed as possible and provide log
snippests):
After creating a pool with compression, You can't disable the compression. The UI accept the change and also the pool CR but ceph is not aware of the change and rook logs show:
2021-05-09 17:14:27.359149 E | cephclient: failed to set property "compression_mode" to pool "np1" to "". failed to set pool property "compression_mode" on pool "np1": Error EINVAL: unrecognized compression mode ''




Version of all relevant components (if applicable):
ocp 4.8.0-0.nightly-2021-04-30-201824
ocs 4.8.0-374.ci 


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Cant disable compression on pool


Is there any workaround available to the best of your knowledge?
Tried through patch to set compression_mode to none instead of "" and it got updated

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

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
Yes

If this is a regression, please provide more details to justify this:
No

Steps to Reproduce:
1. Install ocs 4.8
2. Create a pool with compression
3. Edit the pool and uncheck compression


Actual results:
Pool CR is updated but in ceph level pool still use compression_mode aggressive

[srozen@localhost ~]$ ceph osd pool get np1 compression_mode
compression_mode: aggressive

And there is an error on rook log:
2021-05-09 17:13:17.799674 E | cephclient: failed to set property "compression_mode" to pool "np1" to "". failed to set pool property "compression_mode" on pool "np1": Error EINVAL: unrecognized compression mode ''

Expected results:
Ceph pool should be updated with compression_mode to none

Additional info:

This will give the same error in rook:
This will also not work while using none instead of "" (which throw the same rook log) will work.
[srozen@localhost ~]$ oc patch cephblockpools.ceph.rook.io np1  --type merge -p '{"spec":{"parameters":{"compression_mode":""}}}'

Comment 2 Shay Rozen 2021-05-09 17:56:44 UTC
From No compression to compression the change is working. Only from compression to no compression there is an issue

Comment 3 Travis Nielsen 2021-05-11 15:03:07 UTC
The CephBlockPool CR needs to have the following instead of the empty string, to avoid ceph hitting that error. UI team, can we set this instead?

parameters:
  compression_mode: none

Comment 5 Shay Rozen 2021-05-31 11:06:40 UTC
Verified on

ocp 4.8.0-0.nightly-2021-05-21-233425
ocs 4.8.0-399.ci

Comment 8 errata-xmlrpc 2021-07-27 23:07:32 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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-2021:2438