Bug 2213325 - "stratis pool list --stopped" results in ValueError exception raised if encryption information for a pool is inconsistent
Summary: "stratis pool list --stopped" results in ValueError exception raised if encry...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: stratis-cli
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Bryan Gurney
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-07 20:11 UTC by Bryan Gurney
Modified: 2023-07-03 08:25 UTC (History)
3 users (show)

Fixed In Version: stratis-cli-3.5.3-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-159219 0 None None None 2023-06-07 20:11:57 UTC

Description Bryan Gurney 2023-06-07 20:11:02 UTC
Description of problem:
When displaying stopped pools, the encryption information
in the StoppedPools D-Bus property is unpacked in a manner that
unconditionally expects the structure that the value representing the
pools encryption status has if the
encryption information on the pool is consistent. This unpacking fails
with a ValueError and resulting stack trace if the encryption
information on the pool is inconsistent, as the structure  of the
value being unpacked in that
case is different.

Version-Release number of selected component (if applicable):
stratis-cli-3.5.2-1.el9

How reproducible:
100%

Steps to Reproduce:
1. Create a situation where encryption information on devices in a
single stopped Stratis pool is not consistent.

2. List the stopped pools: stratis pool list --stopped

3. Observe resulting stack trace with ValueError


Actual results:
Stack trace when listing stopped pools.

Expected results:
No stack trace when listing stopped pools.

Additional info:
There are various ways to generate the inconsistent encryption
information on devices within a stopped Stratis pool. Deterministic
techniques require using cryptsetup outside of Stratis to modify the
LUKS header on a device in a Stratis pool.

Comment 1 Bryan Gurney 2023-06-08 19:17:19 UTC
Posted CentOS Stream merge request:
https://gitlab.com/redhat/centos-stream/rpms/stratis-cli/-/merge_requests/17

Comment 5 Filip Suba 2023-07-03 08:25:07 UTC
Verified with stratis-cli-3.5.3-1.el9.


Note You need to log in before you can comment on or make changes to this bug.