Hide Forgot
Description of problem: E.g. When you use libvirt Python binding to save a domain, if the domain saving fails on send "stop" command to monitor. ======== libvirt debug log ====== 14:53:30.826: 21155: debug : qemuHandleMonitorEOF:739 : Received EOF on 0x7f4014002760 'virtlab_test' 14:53:30.826: 21155: debug : qemudShutdownVMDaemon:3406 : Shutting down VM 'virtlab_test' pid=22642 migrated=0 14:53:30.826: 21160: debug : qemuMonitorJSONCommandWithFd:243 : cannot send monitor command '{"execute":"stop"}': Connection reset by peer ======== libvirt Python exception ====== libvir: QEMU error : cannot resolve symlink /tmp/virtlab_test: No such file or directory Traceback (most recent call last): File "libvirt-test-api.py", line 304, in <module> libvirt_test_api.run() File "libvirt-test-api.py", line 168, in run ret = i() File "/usr/local/staf/test/RHEL6/libvirt-test-API/generator.py", line 82, in __call__ retflag = self.generator() File "/usr/local/staf/test/RHEL6/libvirt-test-API/generator.py", line 130, in generator ret = self.cases_func_ref_dict[case_ref_name](case_params) File "/usr/local/staf/test/RHEL6/libvirt-test-API/repos/Python/domain/save.py", line 122, in save domobj.save(guestname, filepath) File "/usr/local/staf/test/RHEL6/libvirt-test-API/lib/Python/domainAPI.py", line 213, in save retval = dom_obj.save(to) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 619, in save if ret == -1: raise libvirtError ('virDomainSave() failed', dom=self) libvirt.libvirtError: cannot resolve symlink /tmp/virtlab_test: No such file or directory Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: libvirt should only try to restore the security lable when the saving is successful. Additional info:
http://www.redhat.com/archives/libvir-list/2011-March/msg01179.html patch posted to upstream.
Based on upstream discussion, it appears this function has two logic bugs. 1. Label restore is attempted even if the function fails prior to changing label in the first place (patch still in discussion): https://www.redhat.com/archives/libvir-list/2011-March/msg01243.html 2. Label restore is attempted twice if the function fails after the first label restore (upstream commit 96d5678): https://www.redhat.com/archives/libvir-list/2011-March/msg01206.html Both issues need to be resolved before this BZ can be moved to POST.
In POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-March/msg00793.html
This bug has been verified on libvirt-0.8.7-17.el6.
The way of verifying the bug is to check if the patch has been added into the source code.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html