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 1844341 - The duplicate block device is listed when iface is set to 'virtio'
Summary: The duplicate block device is listed when iface is set to 'virtio'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Laszlo Ersek
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-05 07:00 UTC by YongkuiGuo
Modified: 2022-11-15 10:13 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.48.4-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 09:52:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
guestfish log (57.37 KB, text/plain)
2020-06-05 07:00 UTC, YongkuiGuo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:7958 0 None None None 2022-11-15 09:53:18 UTC

Description YongkuiGuo 2020-06-05 07:00:50 UTC
Created attachment 1695376 [details]
guestfish log

Description of problem:
The duplicate block device is listed when iface is set to 'virtio'.


Version-Release number of selected component (if applicable):
libguestfs-1.42.0-1.module+el8.3.0+6496+d39ac712.x86_64
qemu-kvm-4.2.0-19.module+el8.3.0+6478+69f490bb.x86_64
kernel-4.18.0-208.el8.x86_64


How reproducible:
100%


Steps:

1. On rhel8.3 host
# qemu-img create virtio.img 1G
Formatting 'virtio.img', fmt=raw size=1073741824

2.
# LIBGUESTFS_BACKEND=direct guestfish

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
      ‘man’ to read the manual
      ‘quit’ to quit the shell

><fs> add-drive virtio.img iface:virtio
><fs> run
><fs> list-devices
/dev/sda
/dev/sda
><fs> list-filesystems
/dev/sda: unknown
/dev/sda: unknown
><fs> quit


Actual results:
as above

Expected results:
Only one block device(/dev/sda) is listed.


Additional info:
No problem when iface is set to 'ide'

Comment 1 Richard W.M. Jones 2020-06-05 09:54:50 UTC
One line reproducer is:

$ LIBGUESTFS_BACKEND=direct guestfish add-drive /dev/null iface:virtio : run : list-devices
/dev/sda
/dev/sda

The libvirt backend has never allowed the iface parameter.  We should
probably ignore it in the direct backend since it's never been possible
to use this parameter correctly.

Comment 2 YongkuiGuo 2020-06-05 10:02:13 UTC
(In reply to Richard W.M. Jones from comment #1)
> One line reproducer is:
> 
> $ LIBGUESTFS_BACKEND=direct guestfish add-drive /dev/null iface:virtio : run
> : list-devices
> /dev/sda
> /dev/sda
> 
> The libvirt backend has never allowed the iface parameter.  We should
> probably ignore it in the direct backend since it's never been possible
> to use this parameter correctly.

Ok, i see. Thanks you.

Comment 4 Eric Hadley 2021-09-08 16:42:26 UTC
Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.

Comment 6 RHEL Program Management 2021-12-05 07:26:58 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 7 Richard W.M. Jones 2021-12-06 08:27:51 UTC
This bug was closed in error by a process we do not control.

Comment 8 Laszlo Ersek 2022-05-04 13:42:36 UTC
[libguestfs PATCH 0/4] ignore "iface" in "add-drive" variants
Message-Id: <20220504134155.11832-1-lersek>
https://listman.redhat.com/archives/libguestfs/2022-May/028802.html

Comment 9 Laszlo Ersek 2022-05-05 11:09:23 UTC
(In reply to Laszlo Ersek from comment #8)
> [libguestfs PATCH 0/4] ignore "iface" in "add-drive" variants
> Message-Id: <20220504134155.11832-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2022-May/028802.html

Upstream commit range 4864d21cb8eb..ddf276884c04.

Comment 10 YongkuiGuo 2022-05-13 04:47:52 UTC
Test with libguestfs-1.48.2-2.el9.x86_64 on RHEL9.1 host:

$ LIBGUESTFS_BACKEND=direct guestfish add-drive /dev/null iface:virtio : run : list-devices
/dev/sda

The result is expected.

Comment 13 YongkuiGuo 2022-07-08 02:53:05 UTC
Verified this bug since the test case for this bug has been automated and passed in the latest nightly compose test.

Comment 15 errata-xmlrpc 2022-11-15 09:52:35 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 (Low: libguestfs security, 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/RHSA-2022:7958


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