[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] VM creation failed : Permission denied : bind(unix:/var/run/libvirt/qemu//VM.monitor)



On Thu, Jul 30, 2009 at 05:44:41PM +0900, Ryota Ozaki wrote:
> On Thu, Jul 30, 2009 at 5:33 PM, Pierre-Gilles
> Mialon<pmialon linagora com> wrote:
> >        I use Ovirt under Fedora 11 with the latest developpement package and the VM
> > creation failed with :
> > bind(unix:/var/run/libvirt/qemu//VM-4.monitor): Permission denied
> 
> Ugh, this is a regression introduced by my patch...
> (see [PATCH] qemu: fix monitor socket reconnection)
> 
> Eventually we need to add ENOENT to errno checks, not replace EACCES
> with ENOENT, I'm not sure why EACCES happens though. Anyone knows that?
[...]
> > libvirt-0.7.0-0.2.gitf055724.fc11.x86_64
> > libvirt-python-0.7.0-0.2.gitf055724.fc11.x86_64
> > libvirt-client-0.7.0-0.2.gitf055724.fc11.x86_64
> > libvirt-qpid-0.2.17-0.fc11.x86_64

  Unclear, he's using the prerelease code from monday, not the one
with the EACCES -> ENOENT replacement patch.

  One possibility for EACCES could be if the socket creation in qemu was
done with a mode not allowing access and modified in subsequent code,
allowing for a small windows where EACCES would be returned. Someone
should check qemu code.
  I think allowing again retry on EACCES should be fine anyway, I don't
see how that could break things, we would just hit a time out in the
worst case where access is never granted.

  So my take is to just do the enclosed patch,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 9fb8506..1877cc0 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -917,8 +917,9 @@ qemudOpenMonitorUnix(virConnectPtr conn,
         if (ret == 0)
             break;
 
-        if (errno == ENOENT || errno == ECONNREFUSED) {
+        if (errno == ENOENT || errno == EACCES || errno == ECONNREFUSED) {
             /* ENOENT       : Socket may not have shown up yet
+             * EACCES       : acces is not yet granted
              * ECONNREFUSED : Leftover socket hasn't been removed yet */
             continue;
         }

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]