Bug 1855520
Summary: | Improve error handling on partial unlock failure of encrypted pools | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Dennis Keefe <dkeefe> |
Component: | stratis-cli | Assignee: | John Baublitz <jbaublitz> |
Status: | CLOSED ERRATA | QA Contact: | guazhang <guazhang> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.3 | CC: | amulhern, dkeefe, guazhang, jbaublitz |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 2.1.1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-04 03:55:54 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: |
Description
Dennis Keefe
2020-07-10 04:11:55 UTC
Hello stratis --propagate key set --keyfile-path /tmp/new_key_devsdk test_key_devsdk stratis --propagate pool create devsdk --key-desc test_key_devsdk /dev/sdk stratis --propagate key set --keyfile-path /tmp/new_key_devsdl test_key_devsdl INFO: [2020-08-06 03:31:30] Running: 'stratis pool list'... Name Total Physical Properties devsdb 5.46 TiB / 53.77 MiB / 5.46 TiB ~Ca, Cr devsdk 5.46 TiB / 53.77 MiB / 5.46 TiB ~Ca, Cr devsdl 5.46 TiB / 53.77 MiB / 5.46 TiB ~Ca, Cr reboot stratis --propagate key set --keyfile-path /tmp/new_key_devsdl test_key_devsdl stratis --propagate pool unlock Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/stratis_cli/_main.py", line 43, in the_func result.func(result) File "/usr/lib/python3.6/site-packages/stratis_cli/_parser/_parser.py", line 87, in wrapped_func func(*args) File "/usr/lib/python3.6/site-packages/stratis_cli/_actions/_top.py", line 845, in unlock_pools raise StratisCliAggregateError("unlock", "pool", errors) stratis_cli._errors.StratisCliAggregateError: The operation 'unlock' on a resource of type pool failed. The following errors occurred: Partial action "unlock" failed for pool with UUID 88ca429d746d49a88c63cc7e73ba3385: Cryptsetup error: IO error occurred: Invalid argument (os error 22) Partial action "unlock" failed for pool with UUID 28539b84cd4549e5b4ee488697ad423f: Cryptsetup error: IO error occurred: Invalid argument (os error 22) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/bin/stratis", line 35, in <module> main() File "/usr/bin/stratis", line 32, in main return run()(sys.argv[1:]) File "/usr/lib/python3.6/site-packages/stratis_cli/_main.py", line 60, in the_func raise StratisCliActionError(command_line_args, result) from err stratis_cli._errors.StratisCliActionError: Action selected by command-line arguments ['--propagate', 'pool', 'unlock'] which were parsed to Namespace(func=<function add_subcommand.<locals>.wrap_func.<locals>.wrapped_func at 0x7f53d74680d0>, propagate=True) failed devsdl 5.46 TiB / 53.77 MiB / 5.46 TiB ~Ca, Cr devsdl /dev/dm-3 5.46 TiB Data [root@storageqe-24 ~]# stratis pool list Name Total Physical Properties devsdl 5.46 TiB / 53.77 MiB / 5.46 TiB ~Ca, Cr [root@storageqe-24 ~]# stratis key list Key Description test_key_devsdl [root@storageqe-24 ~]# rpm -qa |grep stratis stratis-cli-2.1.1-6.el8.noarch stratisd-2.1.0-1.el8.x86_64 cryptsetup-2.3.3-1.el8.x86_64 4.18.0-221.el8.x86_64 please have a look the error ? Hello, this actually looks like it's doing what it's supposed to be doing. Based on the commands you've provided and the commands provided by Dennis for reproducing the behavior, the pool devsdl should now be unlocked while the other two should still be locked. When only one key is provided for three encrypted pools with different encryption keys, the CLI attempts to unlock each encrypted pool and will print out a message for each pool where the key has not been set in the keyring while successfully unlocking the pool whose key is set in the keyring. The steps Dennis provided would have stopped at the first error in the previous version of stratis-cli, but with the most recent version, it will try to unlock all devices and will report all devices that could not be successfully unlocked while unlocking the ones that can be successfully unlocked. Let me know if you need additional clarification. thanks for the explain, so move the bug to verified 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 (stratis-cli bug fix and enhancement 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-2020:4794 |