This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2052405 - Wrong error info reported when executing virsh client without starting daemon
Summary: Wrong error info reported when executing virsh client without starting daemon
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: yafu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-09 08:19 UTC by yafu
Modified: 2023-06-30 18:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-30 18:39:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-700 0 None None None 2023-06-30 18:39:45 UTC
Red Hat Issue Tracker RHELPLAN-111664 0 None None None 2022-02-09 08:27:09 UTC

Description yafu 2022-02-09 08:19:52 UTC
Description of problem:
Wrong error info reported when executing 'virsh list' without starting virtqemud 

Version-Release number of selected component (if applicable):
libvirt-8.0.0-3.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Install libvirt pkgs:
# yum -y install libvirt*

2.Executing virsh list without starting virtqemud:
#virsh list
error: failed to connect to the hypervisor
error: Operation not supported: Cannot use direct socket mode if no URI is set

3.

Actual results:


Expected results:
Should report error to remind no existing socket file, such as:
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory

Additional info:

Comment 1 yafu 2022-02-22 01:59:42 UTC
Also meet below error info when no virtqemud.sock existing:
# virsh list
error: failed to connect to the hypervisor
error: internal error: connection not open

Comment 2 Han Han 2023-03-31 06:52:09 UTC
Bisection shows the error msg is updated since v7.4.0-215-g3e9b561139
commit 3e9b561139
Author: Daniel P. Berrangé <berrange>
Date:   Tue May 25 10:45:06 2021 +0100

    remote: add support for probing drivers with modular daemons
    
    With the traditional libvirtd, the virConnectOpen call will probe active
    drivers server side to find which one to use when the URI is NULL/empty.
    
    With the modular daemons though, the remote client does not know which
    daemon to connect in the first place, so we can't rely on virConnectOpen
    probing. Currently the virtproxyd daemon has code to probe for a
    possible driver by looking at which sockets are listening or which
    binaries are installed. The remote client can thus connect to virtproxyd
    which in turn can connect to a real hypervisor driver.
    
    The virtproxyd probing code though isn't something that needs to live in
    virtproxyd. By moving it into the remote client we can get probing
    client side in all scenarios and avoid the extra trip via virtproxyd in
    the common case.
    
    Tested-by: Jim Fehlig <jfehlig>
    Reviewed-by: Michal Privoznik <mprivozn>
    Signed-off-by: Daniel P. Berrangé <berrange>


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