Bug 1324587

Summary: Large domain names in qemu VMs abort due to Monitor path too large
Product: [Fedora] Fedora Reporter: Oliver Gutiérrez <ogutierr>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: agedosier, aruizrui, berrange, clalancette, crobinso, dyuan, fjin, itamar, jforbes, laine, libvirt-maint, ogutierr, veillard, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.3.3-1.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-11 11:50:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oliver Gutiérrez 2016-04-06 17:29:54 UTC
Description of problem:
When trying to start a new domain with a large name, libvirt aborts machine creation due to Monitor path too large.

Version-Release number of selected component (if applicable): Fedora 24, libvirt 1.3.2-3.fc24

How reproducible: Always

Steps to Reproduce:
1. Create a virtual machine with a very large name field in it's XML. In session mode is easier to reproduce due to /home/username/ being part of the monitor path.

Actual results:
Libvirt fails to create VM throwing "Monitor path PATH too big for destination" in journalctl

Expected results:
To not fail depending on the length of virtual machine name and system username.

Additional info:

Exact line that throws the message in libvirt code
https://github.com/libvirt/libvirt/blob/1d8351a94f4040610cf4ca4a8afc8f24f412132f/src/qemu/qemu_monitor.c#L344

Comment 1 Cole Robinson 2016-04-07 13:37:31 UTC
I think this is fixed in libvirt v1.3.3, I'm doing builds now

Comment 2 Cole Robinson 2016-04-07 20:25:19 UTC
commit a89f05ba8df095875f5ec8a9065a585af63a010b
Author: Martin Kletzander <mkletzan>
Date:   Fri Feb 26 09:15:55 2016 +0100

    qemu: Shorten per-domain directory names

Comment 3 Fedora Update System 2016-04-07 20:26:19 UTC
libvirt-1.3.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8dbe770939

Comment 4 Fedora Update System 2016-04-08 16:53:00 UTC
libvirt-1.3.3-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8dbe770939

Comment 5 Oliver Gutiérrez 2016-04-11 08:57:35 UTC
Still getting same error. Have created a VM with a big name and it fails.

abr 11 09:51:51 rigel libvirtd[8308]: internal error: Monitor path /home/ogutierr/.config/libvirt/qemu/lib/domain-fedora-unkno-fc-092121b3-ce8e-47e6-997f-ddd5ffedd9b5/monitor.sock too big for destination

Checked installed Packages

libvirt.x86_64                                                 1.3.3-1.fc24                          @updates-testing
libvirt-client.x86_64                                          1.3.3-1.fc24                          @updates-testing
libvirt-daemon.x86_64                                          1.3.3-1.fc24                          @updates-testing

And so on.

Comment 6 Fedora Update System 2016-04-11 09:12:35 UTC
libvirt-1.3.3-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Oliver Gutiérrez 2016-04-11 09:20:27 UTC
I repeat the message I put before. The error is still happening.

Still getting same error. Have created a VM with a big name and it fails.

abr 11 09:51:51 rigel libvirtd[8308]: internal error: Monitor path /home/ogutierr/.config/libvirt/qemu/lib/domain-fedora-unkno-fc-092121b3-ce8e-47e6-997f-ddd5ffedd9b5/monitor.sock too big for destination

Checked installed Packages

libvirt.x86_64                                                 1.3.3-1.fc24                          @updates-testing
libvirt-client.x86_64                                          1.3.3-1.fc24                          @updates-testing
libvirt-daemon.x86_64                                          1.3.3-1.fc24                          @updates-testing

And so on.

Comment 8 Cole Robinson 2016-04-11 11:42:54 UTC
Oliver, can you make sure you are running latest libvirtd? you may need to 'killall libvirtd' to kill your session copy, then reconnect with gnome-boxes or whatever you are using. That monitor path has UUID embedded in it which should be fixed with the commit I referenced above.

Comment 9 Oliver Gutiérrez 2016-04-11 11:49:48 UTC
Ok. Cole. The problem was that my Libvirt was running on an old copy.

When I restarted libvirtd the problem is not happening.

Thanks and excuse me about the mistake.

Comment 10 Cole Robinson 2016-04-11 11:50:19 UTC
No worries, closing