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 2233744 - The path to the guest agent socket file can become too long and cause problems [rhel-9.2.0.z]
Summary: The path to the guest agent socket file can become too long and cause problem...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On: 2173980
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-23 08:48 UTC by RHEL Program Management Team
Modified: 2023-09-12 10:13 UTC (History)
20 users (show)

Fixed In Version: libvirt-9.0.0-10.3.el9_2
Doc Type: Bug Fix
Doc Text:
Cause: When there's no path provided for a guest <channel/> libvirt generates one. But it uses a very long prefix for that ("/var/lib/libvirt/qemu/channel/target/") which makes it very easy to hit the limit for socket paths. Consequence: Users are unable to connect to the host side of the socket. Fix: The location of the socket was moved under "/var/run/". Result: The path is now much shorter and users can connect to the socket just fine.
Clone Of: 2173980
Environment:
Last Closed: 2023-09-12 10:13:31 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-166222 0 None None None 2023-08-23 08:50:40 UTC
Red Hat Product Errata RHBA-2023:5089 0 None None None 2023-09-12 10:13:34 UTC

Comment 1 Michal Privoznik 2023-08-23 12:45:45 UTC
To POST:

https://gitlab.com/redhat/rhel/src/libvirt/-/merge_requests/121

Comment 7 yalzhang@redhat.com 2023-09-01 10:24:43 UTC
Test on libvirt-9.0.0-10.3.el9_2.x86_64, the result is as expected

1. Start the vm and check the guest agent socket path:
<channel type="unix">
  <target type="virtio" name="org.qemu.guest_agent.0"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

After vm started with root user, check the socket path:
<channel type="unix">
  <source mode="bind" path="/run/libvirt/qemu/channel/1-rhel/org.qemu.guest_agent.0"/>
  <target type="virtio" name="org.qemu.guest_agent.0" state="connected"/>
  <alias name="channel3"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

After vm started with unprivileged user test(uid: 1000), check the socket path:
<channel type="unix">
  <source mode="bind" path="/run/user/1000/libvirt/qemu/run/channel/1-test/org.qemu.guest_agent.0"/>
  <target type="virtio" name="org.qemu.guest_agent.0" state="connected"/>
  <alias name="channel0"/>
  <address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>

2. The socket path updated as expected(delete the "target/domain-" and place the channel target dir into state dir):
With root(domain name is “rhel”):
Before: /var/lib/libvirt/qemu/channel/target/domain-2-rhel/org.qemu.guest_agent.0   length=73
After: /run/libvirt/qemu/channel/1-rhel/org.qemu.guest_agent.0                      length=55

With unprivileged user test(domain name is “test”):
Before: /home/test/.config/libvirt/qemu/channel/target/domain-2-test/org.qemu.guest_agent.0  length= 83
After: /run/user/1000/libvirt/qemu/run/channel/1-test/org.qemu.guest_agent.0                 length= 69

For root user, the socket path length decrease by 18; for non-root user, it decrease by 14;

3. Check the guest agent function - pass
4. Domain lifecycle test - pass
5. Hotplug and unplug - pass
6. Migration and cross migration - pass

Comment 11 errata-xmlrpc 2023-09-12 10:13:31 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 (libvirt bug fix 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:5089


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