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 2097662 - [Machines] The Target path is not listed correctly when creating storage pool
Summary: [Machines] The Target path is not listed correctly when creating storage pool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cockpit-machines
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 9.3
Assignee: Nobody
QA Contact: Xianghua Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-16 09:19 UTC by Xianghua Chen
Modified: 2023-11-07 09:05 UTC (History)
5 users (show)

Fixed In Version: 288
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:24:46 UTC
Type: Bug
Target Upstream Version: 288
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-125442 0 None None None 2022-06-16 09:26:25 UTC
Red Hat Product Errata RHBA-2023:6336 0 None None None 2023-11-07 08:24:59 UTC

Description Xianghua Chen 2022-06-16 09:19:21 UTC
Description of problem:
[Machines] The Target path is not listed correctly when creating storage pool 
 
Packages:
cockpit-machines-269-1.el9.noarch
cockpit-269-1.el9.x86_64
libvirt-8.4.0-1.el9.x86_64

How reproducible:
100%

Steps:
1.  Create a user which is in libvirt group, such as test_libvirt:
# useradd -G libvirt test_libvirt
# passwd test_libvirt

2. Create two directories, such as:
mkdir /home/test
mkdir -p /home/test_libvirt/tmp

3. Use test_libvirt to log into the web console, enter Storage pools of Virtual Machines page

4. Click "Create storage pool" : 
Connection           System
Name                    test1
Type                      Filesystem directory
Target path           /home/test_libvirt/tmp

When entering part of the Target path, like /home/test , you will see /home/test_libvirt is not in the dropdown list.

Actual results:
Refer to step 4.

Expected results:
Should better list all the info in the list like :
/home/test/
/home/test_libvirt/

Additional info:

Comment 1 Xianghua Chen 2022-06-16 09:21:48 UTC
Actually this issue can be reproduced with root user too, so can skip step 1.

Comment 2 Katerina Koukiou 2023-01-24 18:34:42 UTC
Can you please let me know if you use 'Limited' or 'Privileged' mode when you login with the test_libvirt account?

When you create the /home/test_libvirt do you give it the correct permissions or it is root:root? 

You can maybe create the new user with `useradd -m -d /PATH/TO/FOLDER USERNAME`

Comment 3 Xianghua Chen 2023-02-06 03:26:56 UTC
Hi Katerina, sorry for late update. 
Yes when using the test_libvirt account, it's limited, and it can not change to Privileged with the create method "useradd -G libvirt test_libvirt".

Actually it's not permission issue I think, because when you  input each of following info you can see /home/test/ & /home/test_libvirt/: 
/home/
/home/t
/home/te
/home/tes

But when you input the last letter "t": /home/test , then /home/test_libvirt/ disappear in the dropdown list.

Comment 4 Katerina Koukiou 2023-02-09 22:33:52 UTC
Reproduceable more simple by the following steps:

[kkoukiou@192 ~]$ mkdir /tmp/test
[kkoukiou@192 ~]$ mkdir /tmp/test-1
[kkoukiou@192 ~]$ touch /tmp/test/test-content

In any dialog cockpit allows us using the FileAutoComplete component from pkg/lib type /tmp/test and expect /tmp/test-1 to be part of the dropdown. The bug is that it's not.

Comment 5 Simon Kobyda 2023-04-04 17:13:54 UTC
PR: https://github.com/cockpit-project/cockpit/pull/18606/

Comment 8 Xianghua Chen 2023-06-07 07:05:38 UTC
Verified with packages:
cockpit-machines-291-1.el9.noarch
cockpit-292-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-client-9.3.0-2.el9.x86_64

Steps:
1.  Create a user which is in libvirt group, such as test_libvirt:
# useradd -G libvirt test_libvirt
# passwd test_libvirt

2. Create two directories, such as:
mkdir /home/test
mkdir -p /home/test_libvirt/tmp

3. Use test_libvirt to log into the web console, enter Storage pools of Virtual Machines page

4. Click "Create storage pool" : 
Connection           System
Name                    test1
Type                      Filesystem directory
Target path           /home/test_libvirt/tmp

When entering part of the Target path, like /home/test , you can see all the dir in the list like :
/home/test/
/home/test_libvirt/

The /home/test_libvirt/ is not missing. So verified.

Comment 11 errata-xmlrpc 2023-11-07 08:24:46 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 (cockpit-machines 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-2023:6336


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