Bug 1734496 - Add Pool Name to Output of Error Messages
Summary: Add Pool Name to Output of Error Messages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: stratis-cli
Version: ---
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Dennis Keefe
QA Contact: guazhang@redhat.com
Marek Suchánek
URL:
Whiteboard:
Depends On:
Blocks: 1825061
TreeView+ depends on / blocked
 
Reported: 2019-07-30 17:21 UTC by Dennis Keefe
Modified: 2021-09-06 15:20 UTC (History)
5 users (show)

Fixed In Version: 2.0.1
Doc Type: Enhancement
Doc Text:
.Stratis now lists the pool name on error When you attempt to create a Stratis pool on a block device that is already in use by an existing Stratis pool, the `stratis` utility now reports the name of the existing pool. Previously, the utility listed only the UUID label of the pool.
Clone Of:
Environment:
Last Closed: 2020-11-04 03:55:54 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4794 0 None None None 2020-11-04 03:56:04 UTC

Description Dennis Keefe 2019-07-30 17:21:50 UTC
Brief Description
Stratis currently provides the UUID of a pool when there is an error.  A more user friendly way of providing pool information would be to add the pool name.
This RFE came out of information provided in 1686852.

Comment 1 Jakub Krysl 2019-10-02 11:32:58 UTC
Mass migration to Guangwu.

Comment 2 mulhern 2019-12-23 18:17:36 UTC
We can move this to modified whenever the flags allow, since our changes to the CLI for version 2.0.0 and 2.0.1 mean that the  message from the daemon that the CLI user previously saw will be replaced by a CLI-generated message that will contain the pool name along with other useful information.

Comment 3 Dennis Keefe 2020-01-02 13:45:34 UTC
Example: 
in RHEL 8.1, stratisd 1.0.4
- If a pool was failed and the list pool command as issued, the resulting output would look like this:
# stratis pool list
Execution failure caused by:
no total physical size computed for pool with uuid 9fcf7362-3f2a-4246-b27d-02e7f606849c

in RHEL 8.2, stratisd 2.0.0
- If a pool was failed and the list pool command as issued, the resulting output will look like this:
# stratis pool list
Name                  Total Physical
p1         1 GiB / FAILURE / FAILURE
p2    1 GiB / 37.63 MiB / 986.37 MiB

Recreate:
1. install startisd and stratis-cli
2. enable stratisd in systemd
3. create p1 
4. mount the mdv for p1
5. destroy pool p1
6. list stratis pools
---------
commands:
1. yum -y install stratis-cli
2. systemctl enable stratisd;systemctl start stratisd
3. truncate -s 1g /root/stratis.trunc1;losetup  /dev/loop1 /root/stratis.trunc1
4. mount /dev/mapper/stratis-1-private-{pool_name}-flex-mdv /mnt
5. stratis pool destroy p1
6. stratis pool list

Comment 4 mulhern 2020-01-02 14:11:43 UTC
If we look at the original bz, that was not about the error when listing the pool or the blockdevs, but about the error displayed when trying to create a new pool with blockdevs that already belonged to an existing pool. In the next version, not yet released, which we plan to be stratis-cli 2.0.1, the error looks like this:


# PYTHONPATH=./src ./bin/stratis pool create test_pool /dev/sda
# PYTHONPATH=./src ./bin/stratis pool list
Name                 Total Physical
test_pool   512 EiB / 0 B / 512 EiB
# PYTHONPATH=./src ./bin/stratis pool create test_pool_duplicate /dev/sda
Execution failed:
It appears that you issued an unintended command: At least one of the provided devices is already owned by an existing pool's Data tier; device /dev/sda would be added to the Data tier but is already in use in the Data tier of pool test_pool

In the current version, 2.0.0, it would do what was shown in https://bugzilla.redhat.com/show_bug.cgi?id=1686852
instead.

The reason for this is that now the CLI does a pre-check before issuing a command to the daemon on the D-Bus,
and if the pre-check fails, it returns an appropriate error. Previously, it sent the message to the daemon,
resulting in a less helpful error message for the CLI user.

We take the same approach consistently across all operations, so the CLI user should see consistently helpful error messages more relevant to the commands they entered in all situations.

Comment 5 mulhern 2020-01-02 16:03:38 UTC
This was fully resolved in upstream PR: https://github.com/stratis-storage/stratis-cli/pull/442.

Comment 10 guazhang@redhat.com 2020-06-18 03:28:44 UTC
Hello

[root@storageqe-26 ~]# stratis pool list
Name                             Total Physical   Properties
test-pool   447.11 GiB / FAILURE / FAILURE      ~Ca, Cr
[root@storageqe-26 ~]# 
[root@storageqe-26 ~]# rpm -qa |grep stratis
stratisd-2.1.0-1.el8.x86_64
stratis-cli-2.1.0-5.el8.noarch

so move to verified

Comment 23 errata-xmlrpc 2020-11-04 03:55:54 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 (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


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