RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1686852 - Provide pool name on error instead of ID
Summary: Provide pool name on error instead of ID
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: stratis-cli
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: mulhern
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-08 14:03 UTC by Jakub Krysl
Modified: 2021-09-06 15:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-30 17:24:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jakub Krysl 2019-03-08 14:03:45 UTC
Description of problem:
When user tries to create pool with blockdev that is already in use by another stratis pool, the holding pool is shows as ID, which is not very helpful, as all the stratis-cli tools show pool name and not its ID. Giving the name of the pool would allow user to identify the pool more easily without any extra steps.

# stratis --propagate pool create test_pool_duplicate /dev/sda
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/stratis_cli/_main.py", line 48, in the_func
    result.func(result)
  File "/usr/lib/python3.6/site-packages/stratis_cli/_actions/_top.py", line 57, in create_pool
    raise StratisCliEngineError(rc, message)
stratis_cli._errors.StratisCliEngineError: ERROR: Device /dev/sda already belongs to Stratis pool e938406e-cc57-4a26-9bc7-6d1d52a9fde1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/stratis", line 33, in <module>
    main()
  File "/usr/bin/stratis", line 29, in main
    return run()(sys.argv[1:])
  File "/usr/lib/python3.6/site-packages/stratis_cli/_main.py", line 52, in the_func
    raise StratisCliActionError(command_line_args, result) from err
stratis_cli._errors.StratisCliActionError: Action selected by command-line arguments ['--propagate', 'pool', 'create', 'test_pool_duplicate', '/dev/sda'] which were parsed to Namespace(blockdevs=['/dev/sda'], fu
nc=<function TopActions.create_pool at 0x7f00c43b9378>, pool_name='test_pool_duplicate', propagate=True, redundancy='none') failed

Extra step is needed now to figure out which pool holds the blockdev:
# stratis blockdev
Pool Name  Device Node    Physical Size   State  Tier
test_pool  /dev/sda            9.10 TiB  In-use  Data

Version-Release number of selected component (if applicable):
stratisd-1.0.3-1.el8.x86_64
stratis-cli-1.0.2-1.el8.noarch

How reproducible:
100%

Steps to Reproduce:
1. stratis pool create test_pool /dev/sda
2. stratis pool create test_pool_duplicate /dev/sda
Execution failure caused by:
ERROR: Device /dev/sda already belongs to Stratis pool 9207fb6d-0688-439a-9b40-a388b0ece459
3. stratis pool
Name         Total Physical Size  Total Physical Used
test_pool               9.10 TiB             9.35 GiB

Actual results:
ERROR: Device /dev/sda already belongs to Stratis pool 9207fb6d-0688-439a-9b40-a388b0ece459

Expected results:
ERROR: Device /dev/sda already belongs to Stratis pool 'test_pool'

Additional info:

Comment 1 mulhern 2019-03-08 16:36:02 UTC
I think it is probably better to extend pool table to include UUID.

We prefer to use the UUID because it is persistent, unlike the name.

Comment 2 mulhern 2019-03-08 16:37:59 UTC
This is closely related to: https://bugzilla.redhat.com/show_bug.cgi?id=1642393

Comment 3 Tony Asleson 2019-03-26 14:00:45 UTC
(In reply to mulhern from comment #1)
> I think it is probably better to extend pool table to include UUID.
> 
> We prefer to use the UUID because it is persistent, unlike the name.

Unfortunately I think we are going to need to allow users to change a UUID, to allow them to correct some situations that they may get themselves in: https://github.com/stratis-storage/stratisd/issues/1470

Comment 4 Jakub Krysl 2019-03-26 14:53:54 UTC
Why not giving user both pool name and id?

ERROR: Device /dev/sda already belongs to Stratis pool 'test_pool', ID '9207fb6d-0688-439a-9b40-a388b0ece459'.

Comment 5 Dennis Keefe 2019-07-30 17:24:41 UTC
Feature works as expected, however it would be good to provide users the pool name. 
RFE has been opened to add this feature.  
1734496 - [RFE] Add Pool Name to Output of Error Messages.


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