Hide Forgot
Created attachment 497131 [details] Libvirt and vdsm logs Environment: RHEVM 2.3 on dev env, frontend on Windows, backend on RHEL6. vdsm-4.9-64.el6.x86_64 libvirt-0.8.7-18.el6.x86_64 I suspended VM via RHEVM while working with NFS data storage domain and it became Paused, VDSM logs shows that libvirt failed to save the VM: Thread-3853::ERROR::2011-05-05 17:30:58,631::vm::456::vm.Vm::(run) vmId=`a5043673-bdef-4111-a12d-9c8afe030d8d`::Traceback (most recent call last): File "/usr/share/vdsm/vm.py", line 447, in run self._startUnderlyingMigration() File "/usr/share/vdsm/libvirtvm.py", line 221, in _startUnderlyingMigration self._vm._dom.save(fname) File "/usr/share/vdsm/libvirtvm.py", line 267, in f ret = attr(*args, **kwargs) File "/usr/share/vdsm/libvirtconnection.py", line 59, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 619, in save if ret == -1: raise libvirtError ('virDomainSave() failed', dom=self) libvirtError: Error from child process creating '/rhev/data-center/7cb57d18-fd9f-4af2-ae97-c5f0d3d7dff1/5101e0d1-2ec7-4547-9996-af01a3b06370/images/e7a1aa3e-25a0-4c2d-9708-0062d 749a422/05f75dbe-ff32-4e0d-987a-eeed0dd52922': Unknown error 255 I ran "virsh save vm_id destination_file_in_nfs_storage" in order to suspend it to a manually mounted NFS (NFS with the right owner permissions and without SELinux), and I got the following error message: error: Failed to save domain 6 to /mnt/nfs/6.img error: Error from child process creating '/mnt/nfs/6.img': Unknown error 243 Note that doing the same to the host's local file system works well.
There are two issues here. The first one is "Unknown error 255" which is caused by child process exiting with -errno instead of just errno. And that issue was fixed upstream by v0.8.8-88-gd152f64: commit d152f647606a86992b775c4241ba09dce47fd063 Author: Eric Blake <eblake> Date: Wed Mar 2 16:25:57 2011 -0700 util: correct retry path in virFileOperation In virFileOperation, the parent does a fallback to a non-fork attempt if it detects that the child returned EACCES. However, the child was calling _exit(-EACCES), which does _not_ appear as EACCES in the parent. * src/util/util.c (virFileOperation): Correctly pass EACCES from child to parent. The second one (there should be no error) will be tracked by a cloned bz.
Retested on libvirt-0.9.1-1.el6.x86_64, the same operation still fails, the logs show a bit different error: libvirt ------- 14:15:59.450: 12145: error : virFileOpenAsNoFork:1393 : failed to create file '/rhev/data-center/bae5022e-cc52-4de4-b36c-9102d4e3e585/de89a90c-3a88-497d-8652-b50a45504dc6/images /16bdce8a-9a2d-4a7e-a43a-19b98fb39aef/6762e11d-f972-485d-a25b-de6e9ff90c1f': Permission denied 14:15:59.450: 12145: debug : virStorageFileIsSharedFSType:953 : Check if path /rhev/data-center/bae5022e-cc52-4de4-b36c-9102d4e3e585/de89a90c-3a88-497d-8652-b50a45504dc6/images/ 16bdce8a-9a2d-4a7e-a43a-19b98fb39aef/6762e11d-f972-485d-a25b-de6e9ff90c1f with FS magic 26985 is shared 14:15:59.455: 12145: error : virFileOpenAsNoFork:1393 : failed to create file '/rhev/data-center/bae5022e-cc52-4de4-b36c-9102d4e3e585/de89a90c-3a88-497d-8652-b50a45504dc6/images /16bdce8a-9a2d-4a7e-a43a-19b98fb39aef/6762e11d-f972-485d-a25b-de6e9ff90c1f': Permission denied 14:15:59.455: 12145: error : qemudDomainSaveFlag:2027 : Error from child process creating '/rhev/data-center/bae5022e-cc52-4de4-b36c-9102d4e3e585/de89a90c-3a88-497d-8652-b50a455 04dc6/images/16bdce8a-9a2d-4a7e-a43a-19b98fb39aef/6762e11d-f972-485d-a25b-de6e9ff90c1f': Permission denied VDSM ---- Thread-6733::INFO::2011-05-31 14:15:59,468::dispatcher::100::Storage.Dispatcher.Protect::(run) Run and protect: teardownVolume, Return response: {'status': {'message': 'OK', 'co de': 0}} Thread-6733::DEBUG::2011-05-31 14:15:59,469::utils::330::vm.Vm::(cont) vmId=`1c383153-861f-4765-b8e4-dfb5c403ade7`::Resume statistics collection Thread-6733::ERROR::2011-05-31 14:15:59,469::vm::165::vm.Vm::(_recover) vmId=`1c383153-861f-4765-b8e4-dfb5c403ade7`::Error from child process creating '/rhev/data-center/bae5022 e-cc52-4de4-b36c-9102d4e3e585/de89a90c-3a88-497d-8652-b50a45504dc6/images/16bdce8a-9a2d-4a7e-a43a-19b98fb39aef/6762e11d-f972-485d-a25b-de6e9ff90c1f': Permission denied Thread-6733::ERROR::2011-05-31 14:15:59,470::vm::657::vm.Vm::(cont) vmId=`1c383153-861f-4765-b8e4-dfb5c403ade7`::cannot cont while Saving State Thread-6733::ERROR::2011-05-31 14:15:59,475::vm::220::vm.Vm::(run) vmId=`1c383153-861f-4765-b8e4-dfb5c403ade7`::Traceback (most recent call last): File "/usr/share/vdsm/vm.py", line 212, in run self._startUnderlyingMigration() File "/usr/share/vdsm/libvirtvm.py", line 245, in _startUnderlyingMigration self._vm._dom.save(fname) File "/usr/share/vdsm/libvirtvm.py", line 295, in f ret = attr(*args, **kwargs) File "/usr/share/vdsm/libvirtconnection.py", line 59, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 664, in save if ret == -1: raise libvirtError ('virDomainSave() failed', dom=self) libvirtError: Error from child process creating '/rhev/data-center/bae5022e-cc52-4de4-b36c-9102d4e3e585/de89a90c-3a88-497d-8652-b50a45504dc6/images/16bdce8a-9a2d-4a7e-a43a-19b98 fb39aef/6762e11d-f972-485d-a25b-de6e9ff90c1f': Permission denied
Created attachment 501977 [details] VDSM and Libvirt logs (libvirt-0.9.1-1.el6.x86_64)
That's expected. I left this bz to track the "Unknown error 255" while opened new bug 707257 for the fact that there shouldn't be any error at all. Your testing confirms that the "Unknown error 255" issue was fixed since you got correct error message saying "Permission denied". The error will completely disappear after bug 707257 gets fixed by rebasing libvirt to 0.9.2.
Oded, please specify the libvirt version where this showed up again.
I don't see the "Unknown error 255" anymore but i get "Permission denied" error instead Thread-3299::ERROR::2011-06-29 09:43:58,993::vm::660::vm.Vm::(cont) vmId=`449cebe4-798d-4b28-8a68-c8f67da9657b`::cannot cont while Saving State Thread-3299::ERROR::2011-06-29 09:43:58,996::vm::230::vm.Vm::(run) vmId=`449cebe4-798d-4b28-8a68-c8f67da9657b`::Traceback (most recent call last): File "/usr/share/vdsm/vm.py", line 222, in run self._startUnderlyingMigration() File "/usr/share/vdsm/libvirtvm.py", line 251, in _startUnderlyingMigration self._vm._dom.save(fname) File "/usr/share/vdsm/libvirtvm.py", line 301, in f ret = attr(*args, **kwargs) File "/usr/share/vdsm/libvirtconnection.py", line 59, in wrapper ret = f(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 793, in save if ret == -1: raise libvirtError ('virDomainSave() failed', dom=self) libvirtError: Error from child process creating '/rhev/data-center/da1614e0-56c6-46dc-b07e-10698c999d99/9ce60e28-448d-4fa5-8733-1a15d400e295/images/c49cfcf2-743b-4d29-a45b-3a1cf767cc26/c2160041-aa77-4b46-8cb1-e1ff07856fe5': Permission denied [root@blue-vdsb ~]# rpm -q libvirt libvirt-0.9.2-1.el6.x86_64
Good, you do see "Permission denied" instead of "Unknown error", which is all this BZ is about and it is fixed. The thing that you shouldn't see any error at all is covered by a separate bug 707257.
According to comment 11, move it to VERIFIED.
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, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1513.html