Complete
Details
Assignee
WaqarWaqarReporter
Brett KellerBrett KellerLabels
Impact
MediumComponents
Fix versions
Affects versions
Priority
Low
Details
Details
Assignee
Waqar
WaqarReporter
Brett Keller
Brett KellerLabels
Impact
Medium
Components
Fix versions
Affects versions
Priority
More fields
More fields
More fields
Katalon Platform
Katalon Platform
Katalon Platform
Created November 19, 2020 at 7:31 PM
Updated July 1, 2022 at 2:53 PM
Resolved December 8, 2020 at 2:37 PM
The TrueNAS 12.0 WebUI allows a user to choose from 3-4 different levels of zstd compression on a dataset, but ZFS itself offers many more. A dataset might have a zstd compression level set on it that isn't offered by the WebUI, whether set through the command line or set on a different system and then imported into TrueNAS.
When a dataset has a zstd compression level set that isn't available in the WebUI, it becomes impossible to edit any of the dataset's properties in the WebUI, even if those properties are completely unrelated to compression. TrueNAS throws an error, does not save any changes made in the WebUI, and displays the following traceback:
Error: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 137, in call_method result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self, File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1191, in _call return await methodobj(*prepared_call.args) File "/usr/local/lib/python3.8/site-packages/middlewared/service.py", line 463, in update rv = await self.middleware._call( File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1191, in _call return await methodobj(*prepared_call.args) File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 972, in nf args, kwargs = clean_and_validate_args(args, kwargs) File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 930, in clean_and_validate_args value = attr.clean(args[args_index + i]) File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 607, in clean data[key] = attr.clean(value) File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 167, in clean value = super(Str, self).clean(value) File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 53, in clean raise Error(self.name, f'Invalid choice: {value}') middlewared.schema.Error: [compression] Invalid choice: ZSTD-19
Steps to reproduce:
Create a new dataset in the WebUI using default values
At the commandline, set a zstd compression level not available in the WebUI. For example:
zfs set compression=zstd-19 testPool/zstd-test
Back in the WebUI, select "Edit Options" on the dataset
Change a property unrelated to compression, e.g. change "Enable atime" to "off"
Attempt to save the changes
Observed results:
The WebUI pops up with a traceback error and the change to the dataset is not saved.
Expected results:
The change to the dataset is saved without error. Even if the WebUI does not offer a particular compression setting, it shouldn't choke on saving completely unrelated changes to the dataset when such a compression setting happens to already exist on a dataset.