Bug 1715388

Summary: [machines]The storage pool whose creation was failed is still be added
Product: Red Hat Enterprise Linux 8 Reporter: YunmingYang <yunyang>
Component: cockpit-appstreamAssignee: Katerina Koukiou <kkoukiou>
Status: CLOSED ERRATA QA Contact: YunmingYang <yunyang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.1CC: leiwang, mmarusak, mpitt, qiyuan, wchadwic, wshi, xchen
Target Milestone: rcKeywords: Rebase
Target Release: 8.2Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:41:55 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 YunmingYang 2019-05-30 08:57:38 UTC
Description of problem:
If the storage pool creation was failed, the storage pool will be still added on the storage pool page, and its state is inactive.


Version-Release number of selected component (if applicable):
cockpit-machines-193-1.el8.noarch
libvirt-dbus-1.2.0-2.module+el8.1.0+2983+b2ae9c0a.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a 'Network File System' storage pool with using 'QEMU/KVM User connection'
2. Make sure the result with command which is 'virsh pool-list --all'

Actual results:
1. There will be an error shown on the dialog.
2. The storage pool whose creation was failed is also added on the page, the state of it is inactive.
3. The command can also get this storage pool.

Expected results:
1. There will be an error shown on the dialog.
2. The storage pool whose creation was failed should not be added on the page.
3. The command can not get this storage pool.

Additional info:

Comment 1 Katerina Koukiou 2019-05-31 16:08:12 UTC
This was fixed recently with:
commit 182f70fd8da2d06342ceaf4c322131f2fe17ad3c
Author: Katerina Koukiou <kkoukiou>
Date:   Mon May 20 14:55:53 2019 +0200

    machines: when a storage pool failed to get active undefine it directly

$ git describe 182f70fd8da2d06342ceaf4c322131f2fe17ad3c
194-46-g182f70fd8


It's fixed with cockpit-machines-195. This is not available yet in latest-RHEL-8 though.

Comment 3 YunmingYang 2019-06-20 03:20:18 UTC
Test Versions:
cockpit-machines-196-1.el8.noarch
libvirt-dbus-1.2.0-2.module+el8.1.0+2983+b2ae9c0a.x86_64


Test Steps:
1. Create a 'Network File System' storage pool with using 'QEMU/KVM User connection'
2. Make sure the result with command which is 'virsh pool-list --all'


Test Results:
The storage pool whose creation is failed didn't appear.


According to the results, move the status to VERIFIED.

Comment 11 Martin Pitt 2019-08-29 15:57:08 UTC
For the record, there is a proper fix now: https://github.com/cockpit-project/cockpit/pull/12635

Comment 13 Martin Pitt 2019-09-09 14:12:46 UTC
This should now be fixed properly in 197.3-1, in https://errata.devel.redhat.com/advisory/40553 . Can you please re-test?

Comment 14 YunmingYang 2019-09-16 06:02:28 UTC
Hi @Martin, I test with 197.3-1, but it seems that the issue still exist, but the issue disappear in the 202-1(upstream version). Then I checked the https://github.com/cockpit-project/cockpit/blob/rhel-8.1/pkg/machines/components/storagePools/storagePoolList.jsx and it seems that the fix in https://github.com/cockpit-project/cockpit/pull/12635 are not there.

Comment 15 Martin Pitt 2019-09-18 14:23:50 UTC
@Yunming: cockpit-appstream is built from the "rhel-8-appstream" branch, not the "rhel-8.1" branch. https://github.com/cockpit-project/cockpit/blob/rhel-8-appstream/pkg/machines/components/storagePools/storagePoolList.jsx does have that fix (and it's included in 197.3).

Comment 16 YunmingYang 2019-09-19 07:33:09 UTC
@Martin many thanks, but I tested it in 197.3 again, the issue can be still reproduced.

Comment 17 Martin Pitt 2019-09-19 08:25:55 UTC
Hmm, Katerina/Simon, do you know what other commit/PR we need to backport for this?

Comment 18 Katerina Koukiou 2019-09-19 09:32:34 UTC
It's the following commit which was missing from rhel-8-appstream branch:
commit afae77cce1c015b95f75a5e87050003dc940f97b
Author: Katerina Koukiou <kkoukiou>
Date:   Mon Jul 15 11:51:57 2019 +0200

    machines: add missing updateOnly parameter in getStoragePool action
    
I cherry-picked it from master in this PR https://github.com/cockpit-project/cockpit/pull/12848

Comment 19 Martin Pitt 2019-09-19 15:01:25 UTC
Thanks Katerina! I'll update the 8.1 package with this fix early next week.

Comment 21 Martin Pitt 2019-09-20 07:48:21 UTC
OK, moving to 8.2 then.

Comment 23 errata-xmlrpc 2019-11-05 20:41:55 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, 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-2019:3325