FS#59697 - [libvirt] 4.6.0-2 no connection to qemu

Attached to Project: Community Packages
Opened by rainer (raneon) - Friday, 17 August 2018, 20:57 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 18 August 2018, 16:39 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 10
Private No

Details

Description: Since the upgrade to libvirt 4.6.0-2 it is not possible to connect to qemu anymore. Tested with Virt-Manager now on 3 different hosts, it cannot connect to libvirt, even though the service is running somehow.


Additional info:
* libvirt 4.6.0-2, qemu 2.12.1, linux 4.18.1
* config like in Wiki
$ systemctl status libvirtd
● libvirtd.service - Virtualization daemon
Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2018-08-17 22:05:34 CEST; 4min 5s ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 1162 (libvirtd)
Tasks: 19 (limit: 32768)
Memory: 14.2M
CGroup: /system.slice/libvirtd.service
└─1162 /usr/bin/libvirtd

Aug 17 22:05:34 host1 systemd[1]: Started Virtualization daemon.
Aug 17 22:05:44 host1 libvirtd[1162]: 2018-08-17 20:05:44.346+0000: 1165: info : libvirt version: 4.6.0
Aug 17 22:05:44 host1 libvirtd[1162]: 2018-08-17 20:05:44.346+0000: 1165: info : hostname: host1
Aug 17 22:05:44 host1 libvirtd[1162]: 2018-08-17 20:05:44.346+0000: 1165: error : virConnectOpenInternal:1072 : No connection driver available for qemu:///system
Aug 17 22:05:44 host1 libvirtd[1162]: 2018-08-17 20:05:44.350+0000: 1162: error : virNetSocketReadWire:1805 : End of file during read of data: Input-/Output error


Steps to reproduce:
1. Upgrade to libvirt 4.6.0-2
2. You cannot connect to libvirt anymore with Virt-Manager
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Saturday, 18 August 2018, 16:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with libvirt-4.6.0-3
Comment by rainer (raneon) - Friday, 17 August 2018, 20:59 GMT
Workaround: Downgrade to libvirt 4.5, I couldn't test if 4.6.0-1 works, but it is possible too.
Comment by Jon Jadot (jonjadot) - Friday, 17 August 2018, 22:35 GMT
Exact same issue. Exact same solution. Except I used 4.6.0-1 and it worked.
Comment by Anthony Ruhier (Anthony25) - Friday, 17 August 2018, 23:40 GMT
It's because the `--with-qemu` compilation option has been removed in 4.6.0-2. I don't know if it has been done on purpose or by mistake.
Comment by Jake Barnes (DuBistKomisch) - Saturday, 18 August 2018, 00:48 GMT
Seeing the same thing. /usr/lib/libvirt/connection-driver/libvirt_driver_qemu.so missing because of removed --with-qemu in 4.6.0-2. Upstream bug appears to be https://bugzilla.redhat.com/show_bug.cgi?id=1614569, I guess qemu support is dependent on jansson in 4.6? Downgrading to 4.6.0-1 and 4.5.0-1 both seem to work.
Comment by Toolybird (Toolybird) - Saturday, 18 August 2018, 01:53 GMT
4.6 release is bugged as mentioned here:

https://bbs.archlinux.org/viewtopic.php?pid=1802671#p1802671

To revert properly, Arch packager will likely have to apply full series of 16 patches mentioned.

The current attempt is no good because qemu driver is not built.

I haven't personally hit the "too big integer" bug but it probably depends on your use case.
Comment by Jolan Luff (jolan) - Saturday, 18 August 2018, 05:00 GMT
It's pretty straightforward to pull the fixes from Debian. There are 14 Revert-* patches at https://salsa.debian.org/libvirt-team/libvirt/tree/debian/sid/debian/patches that can be applied in the order specified here https://salsa.debian.org/libvirt-team/libvirt/blob/debian/sid/debian/patches/series, and add back --with-qemu.
Comment by loqs (loqs) - Saturday, 18 August 2018, 08:56 GMT
git clone https://libvirt.org/git/libvirt.git
cd libvirt
git checkout v4.6.0
git cherry-pick --strategy=recursive -X theirs b88fce05ff68d722437ab52669a86e0676a93429..86db0db979c39df278f03dbf3b4239c873ddb637
git format-patch v4.6.0..

Add patches to PKGBUILD and add back --with-qemu option

Please note this is only build tested.
Comment by Mark (markg85) - Saturday, 18 August 2018, 13:03 GMT
Just yesterday i had been fighting this very issue. It was really nasty to figure out because one pc (with a slightly older libvirt installation also from Arch) had the QEMU driver but a newer one had no such thing.
In my case simple rebuilding libvirt solved it as that picked up QEMU.
Comment by Carlos D. Garza (crc32c) - Saturday, 18 August 2018, 13:28 GMT
was able to downgrade by executing the command "pacman -U /var/cache/pacman/pkg/libvirt-4.5.0-1-x86_64.pkg.tar.xz" according to the documentation at https://wiki.archlinux.org/index.php/downgrading_packages
Comment by loqs (loqs) - Saturday, 18 August 2018, 13:38 GMT
@markg85 I can reproduce your result outside a clean chroot:
configure: QEMU: yes
....
configure: jansson: yes (CFLAGS='' LIBS='-ljansson ')
which is using jansson and is affected by https://bugzilla.redhat.com/show_bug.cgi?id=1614569

extra-x86_64-build
configure: QEMU: no
configure: jansson: no

extra-x86_64-build with --with-qemu passed to configure
configure: error: Jansson >= 2.5 is required to build QEMU driver
Comment by Carlos D. Garza (crc32c) - Saturday, 18 August 2018, 13:39 GMT
Normally I have to start qemu with sudo virsh net-start default but that failed
with an error message saying no json parser implementation could be found after this upgrade.
18 07:14:23 bitchslap libvirtd[546]: 2018-08-18 12:14:23.940+0000: 624: error : virJSONValueFromString:1662 : internal error: No JSON parser implementation is available"
Aug 18 06:52:13 bitchslap libvirtd[546]: 2018-08-18 11:52:13.591+0000: 621: error : virMacMapLoadFile:159 : internal error: invalid json in file: /var/lib/libvirt/dnsmasq/virbr0.macs

this prevented libvirt from loading my customized mac addresses which was
Comment by Christian Rebischke (Shibumi) - Saturday, 18 August 2018, 14:35 GMT
Hello everybody,
I've removed the --with-qemu flag on purpose, because like loqs said already it will break the build process. I just didn't know that it will also remove qemu support in the version 4.6.0.
The problem with version 4.6.0-1 was people complained that the communication between libvirt and virtmanager and other GUIs don't work anymore.

@loqs thanks for your patch. I will try it out.
Comment by Mark (markg85) - Saturday, 18 August 2018, 14:44 GMT
Lol, how can you even expect that removing qemu won't remove qemu support?
It makes me rather surprised that recompiling (which i did) added qemu support as i didn't change any flags. Perhaps it's auto detecting features which might have saved me in this case.

I personally rather don't have an updated package but with qemu working then a package without qemu support at all.
Comment by Steven De Bondt (eggz) - Saturday, 18 August 2018, 14:52 GMT
Rather weird comment to make. To be clear, Its also not really a gui problem, you can test it with 'virsh -c qemu:///system'; in a shell. This is probably what the gui calls aswell.
Comment by Christian Rebischke (Shibumi) - Saturday, 18 August 2018, 15:04 GMT
Here is the package. I would like to have some feedback. Does this work for you?

http://pkgbuild.com/~shibumi/libvirt-4.6.0-3-x86_64.pkg.tar.xz

Comment by Steven De Bondt (eggz) - Saturday, 18 August 2018, 15:07 GMT
For me, this seems to work!
Comment by Lee Donaghy (deadite66) - Saturday, 18 August 2018, 15:23 GMT
working for me too.
Comment by Josh O (josho) - Saturday, 18 August 2018, 15:41 GMT
Works for me also.
Comment by Christian Rebischke (Shibumi) - Saturday, 18 August 2018, 16:36 GMT
great! thanks for the feedback

Loading...