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 1999372 - Error unclear when starting guest with wrong virtiofsd path
Summary: Error unclear when starting guest with wrong virtiofsd path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-31 03:55 UTC by Lili Zhu
Modified: 2022-11-15 10:38 UTC (History)
5 users (show)

Fixed In Version: libvirt-8.1.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:03:03 UTC
Type: Bug
Target Upstream Version: 8.1.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-95654 0 None None None 2021-08-31 03:57:05 UTC
Red Hat Product Errata RHSA-2022:8003 0 None None None 2022-11-15 10:03:48 UTC

Internal Links: 1805324

Description Lili Zhu 2021-08-31 03:55:33 UTC
Description of problem:
Error unclear when starting guest with wrong  virtiofsd path

Version-Release number of selected component (if applicable):
libvirt-daemon-7.6.0-2.module+el8.5.0+12219+a5ea13d2.x86_64

How reproducible:
100%


Steps to Reproduce:
1. check the virtiofsd.json file
# cat /usr/share/qemu/vhost-user/50-qemu-virtiofsd.json
{
  "description": "QEMU virtiofsd vhost-user-fs",
  "type": "fs",
  "binary": "/usr/libexec/virtiofsd"  <==binary path is updated
}


2. prepare a guest with the following xml
...
 <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs'/>
      <binary path='/sbin/virtiofsd'/>
      <source dir='/path'/>
      <target dir='mount_tag'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </filesystem>
...

3. start the guest
# virsh start avocado-vt-vm1 
error: Failed to start domain 'avocado-vt-vm1'
error: internal error: virtiofsd died unexpectedly

Expected results:
Should report clear error msg to show that virtiofsd binday is not correct.


Additional info:

Comment 1 Ján Tomko 2022-01-27 14:39:05 UTC
libvirt actually logs the error into virtiofsd.log:
libvirt:  error : cannot execute binary /sbin/virtiofsd: No such file or directory

But checking if the binary exists upfront (virExec does not do that check
for relative paths) and/or reporting the errors from the log from early startup
(like we do with QEMU) would be much more helpful.

Comment 2 Ján Tomko 2022-01-27 18:23:54 UTC
Patch that checks if the binary is existing and executable before trying to run it:
https://listman.redhat.com/archives/libvir-list/2022-January/msg01246.html

Comment 3 Ján Tomko 2022-02-03 13:17:38 UTC
Pushed as:
commit 459f8009c29a40b48f1a28846003d1c5d7e04539
Author:     Ján Tomko <jtomko>
CommitDate: 2022-02-03 14:15:04 +0100

    qemu: virtiofs: check whether the supplied binary exists
    
    Report an error upfront if the binary does not exist
    or is not executable.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1999372
    
    Signed-off-by: Ján Tomko <jtomko>
    Reviewed-by: Andrea Bolognani <abologna>

git describe: v8.0.0-276-g459f8009c2

Comment 4 Lili Zhu 2022-03-19 14:59:09 UTC
Tested with:
libvirt-8.2.0-1.fc35.x86_64

1. prepare a guest with the following xml
...
 <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs'/>
      <binary path='/sbin/virtiofsd'/>
      <source dir='/path'/>
      <target dir='mount_tag'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </filesystem>
...

2. define the guest
# virsh define avocado-vt-vm1 
error: Failed to start domain 'avocado-vt-vm1'
error: internal error: virtiofsd binary '/sbin/virtiofsd' is not executable

Comment 7 Lili Zhu 2022-04-29 02:21:09 UTC
Verified this bug with:
libvirt-8.2.0-1.el9.x86_64

The testing steps are the same with Comment #4.

The testing result matches with the expected result, mark the bug as verified.

Comment 9 errata-xmlrpc 2022-11-15 10:03:03 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: libvirt 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:8003


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