Hide Forgot
Description of problem: libvirtd crash when downgrade libvirt from libvirt 0.9.10-2 to 0.9.4-23 Version-Release number of selected component (if applicable): libvirt-python-0.9.10-2.el6.x86_64 libvirt-client-0.9.10-2.el6.x86_64 libvirt-0.9.10-2.el6.x86_64 libvirt-python-0.9.4-23.el6_2.6.x86_64 libvirt-client-0.9.4-23.el6_2.6.x86_64 libvirt-0.9.4-23.el6_2.6.x86_64 How reproducible: always Steps to Reproduce: [root@zhpeng Downloads]# rpm -qa|grep libvirt libvirt-python-0.9.10-2.el6.x86_64 libvirt-client-0.9.10-2.el6.x86_64 libvirt-0.9.10-2.el6.x86_64 [root@zhpeng Downloads]# service libvirtd status libvirtd (pid 13458) is running... [root@zhpeng Downloads]# rpm -Uvh --oldpackage --force libvirt-0.9.4-23.el6_2.6.x86_64.rpm libvirt-client-0.9.4-23.el6_2.6.x86_64.rpm libvirt-python-0.9.4-23.el6_2.6.x86_64.rpm Preparing... ########################################### [100%] 1:libvirt-client ########################################### [ 33%] 2:libvirt warning: /etc/libvirt/libvirtd.conf created as /etc/libvirt/libvirtd.conf.rpmnew ########################################### [ 67%] warning: %post(libvirt-0.9.4-23.el6_2.6.x86_64) scriptlet failed, exit status 1 3:libvirt-python ########################################### [100%] [root@zhpeng Downloads]# service libvirtd status libvirtd is stopped [root@zhpeng Downloads]# /etc/init.d/libvirtd start Starting libvirtd daemon: [ OK ] [root@zhpeng Downloads]# /etc/init.d/libvirtd status libvirtd (pid 13939) is running... [root@zhpeng Downloads]# rpm -qa|grep libvirt libvirt-python-0.9.4-23.el6_2.6.x86_64 libvirt-client-0.9.4-23.el6_2.6.x86_64 libvirt-0.9.4-23.el6_2.6.x86_64 Actual results: libvirtd stopped. Expected results: At least libvirtd should be still running. Additional info:
If you force install an RPM you'd better know what you are doing and be prepared to fix any resulting problems. This is NOTABUG.
Hi, This time i use "yum downgrade" to test this.and find more issues: Issue 1: Steps: #rpm -qa|grep libvirt libvirt-0.9.10-10.el6.x86_64 libvirt-client-0.9.10-10.el6.x86_64 libvirt-python-0.9.10-10.el6.x86_64 # yum downgrade libvirt libvirt-client libvirt-python ... Installing : libvirt-client-0.9.4-23.el6.x86_64 1/6 Installing : libvirt-0.9.4-23.el6.x86_64 2/6 Non-fatal POSTIN scriptlet failure in rpm package libvirt-0.9.4-23.el6.x86_64 warning: /etc/libvirt/libvirtd.conf created as /etc/libvirt/libvirtd.conf.rpmnew warning: /etc/libvirt/qemu.conf created as /etc/libvirt/qemu.conf.rpmnew warning: /etc/sysconfig/libvirtd created as /etc/sysconfig/libvirtd.rpmnew warning: %post(libvirt-0.9.4-23.el6.x86_64) scriptlet failed, exit status 1 Installing : libvirt-python-0.9.4-23.el6.x86_64 3/6 Cleanup : libvirt-python-0.9.10-10.el6.x86_64 4/6 Cleanup : libvirt-0.9.10-10.el6.x86_64 5/6 Cleanup : libvirt-client-0.9.10-10.el6.x86_64 6/6 ... # service libvirtd status libvirtd is stopped ------> should running. # virsh list error: Failed to reconnect to the hypervisor error: no valid connection error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory # /etc/init.d/libvirtd restart Stopping libvirtd daemon: [FAILED] Starting libvirtd daemon: [ OK ] Issue 2: I defined several guests when i use libvirt-0.9.10-10 and guest xml include usb controller by default like: ... <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> ... # virsh list --all Id Name State ---------------------------------------------------- - mig13 shut off - mig14 shut off # yum downgrade libvirt libvirt-client libvirt-python # service libvirtd restart # virsh list --all Id Name State ---------------------------------- ---->guests disappear # rpm -Uvh libvirt*0.9.10-10* # virsh list --all Id Name State ---------------------------------------------------- - mig13 shut off - mig14 shut off ---->guests come back
I'm not sure why downgrading libvirt stopped the deamon instead of restarting it (it probably failed to start for some reason) but AFAIK downgrading libvirt is not supported in general. If you define some domains with the new libvirt, their XML configuration may contain things that older libvirt doesn't understand (controller type='usb' in this case). Thus the older libvirt will fail to parse those XMLs and they will be ignored.
BTW, there's a related discussion on libvirt-list: https://www.redhat.com/archives/libvir-list/2012-April/msg00352.html
I've opened Bug 815503 to deal specifically with the problem of migrating from a RHEL6.3 host to a RHEL6.2 host - that problem has the same cause, but is more serious due to the absence of any reasonable workaround.
Can we reopen this bug to track the downgrade issue until there is an explicit solution in libvir-list@ ?
There isn't any guarantee that downgrading libvirt will produce defined results, so this isn't a bug even when the downgrade is done with yum. The problem appears to be that the old vesion doesn't accept some of the XML added by the new version, and there's no way to fix that.