[libvirt] /var/run/libvirt

It is a trivial error, but i wonder if: Failed to change group ownership of /var/run/libvirt Failed to bind socket to '/var/run/libvirt/libvirt-sock': No such file or directory This could be corrected to: /var/run/libvirt doesn't exist or an mkdir is done on the directory... Stefan

On Fri, Aug 08, 2008 at 11:49:46AM +0200, Stefan de Konink wrote:
It is a trivial error, but i wonder if:
Failed to change group ownership of /var/run/libvirt Failed to bind socket to '/var/run/libvirt/libvirt-sock': No such file or directory
This could be corrected to:
/var/run/libvirt doesn't exist or an mkdir is done on the directory...
I see install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/ in libvirt spec file and mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt in qemud/Makefile.am as part of install-data-local rule. So it seems it really should be created appropriately as part of 'make install' a better reporting of the error would be fine, but something else went wrong first. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Fri, 8 Aug 2008, Daniel Veillard wrote:
On Fri, Aug 08, 2008 at 11:49:46AM +0200, Stefan de Konink wrote:
It is a trivial error, but i wonder if:
Failed to change group ownership of /var/run/libvirt Failed to bind socket to '/var/run/libvirt/libvirt-sock': No such file or directory
This could be corrected to:
/var/run/libvirt doesn't exist or an mkdir is done on the directory...
I see
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/
in libvirt spec file and
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
in qemud/Makefile.am as part of install-data-local rule. So it seems it really should be created appropriately as part of 'make install'
My /var/run is empty upon boot. (ramfs) One may wonder why libvirt needs a dedicated directory at all for two sockets...
a better reporting of the error would be fine, but something else went wrong first.
See the trivial part. Stefan

On Fri, Aug 08, 2008 at 12:08:05PM +0200, Stefan de Konink wrote:
On Fri, 8 Aug 2008, Daniel Veillard wrote:
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/
in libvirt spec file and
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
in qemud/Makefile.am as part of install-data-local rule. So it seems it really should be created appropriately as part of 'make install'
My /var/run is empty upon boot. (ramfs) One may wonder why libvirt needs a dedicated directory at all for two sockets...
That just happens to be your particular deployment scenario. Other hypervisor drivers put stuff in there too, hence we have a directory. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Fri, 8 Aug 2008, Daniel P. Berrange wrote:
On Fri, Aug 08, 2008 at 12:08:05PM +0200, Stefan de Konink wrote:
On Fri, 8 Aug 2008, Daniel Veillard wrote:
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/run/libvirt/
in libvirt spec file and
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
in qemud/Makefile.am as part of install-data-local rule. So it seems it really should be created appropriately as part of 'make install'
My /var/run is empty upon boot. (ramfs) One may wonder why libvirt needs a dedicated directory at all for two sockets...
That just happens to be your particular deployment scenario. Other hypervisor drivers put stuff in there too, hence we have a directory.
Anyway, it is a trivial fix... if I need to write a patch myself, so be it. Stefan

On Fri, Aug 08, 2008 at 12:08:05PM +0200, Stefan de Konink wrote:
My /var/run is empty upon boot. (ramfs) One may wonder why libvirt needs a dedicated directory at all for two sockets...
This seems to be a valid point. Note that /var/run/libvirt is also used for temporary files, and I think some of the hypervisor drivers can put stuff there too, so it really does need to be a directory. Dan/Dan, any reason we can't 'mkdir' this when libvirtd starts up? Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 60 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

On Sat, 9 Aug 2008, Guido Günther wrote:
On Sat, Aug 09, 2008 at 09:56:45AM +0100, Richard W.M. Jones wrote: [..snip..]
Dan/Dan, any reason we can't 'mkdir' this when libvirtd starts up? Shoulnd't this better be handled in the distros init script?
If that is your argument, then please remove the chmod code too :) Stefan

On Sat, Aug 09, 2008 at 09:56:45AM +0100, Richard W.M. Jones wrote:
On Fri, Aug 08, 2008 at 12:08:05PM +0200, Stefan de Konink wrote:
My /var/run is empty upon boot. (ramfs) One may wonder why libvirt needs a dedicated directory at all for two sockets...
This seems to be a valid point.
Note that /var/run/libvirt is also used for temporary files, and I think some of the hypervisor drivers can put stuff there too, so it really does need to be a directory.
Dan/Dan, any reason we can't 'mkdir' this when libvirtd starts up?
Yep, it seems that we do need to make this special case for /var/run/libvirt because of the tmpfs possibility which isn't handled by make install/RPM Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (6)
-
Daniel P. Berrange
-
Daniel Veillard
-
Guido Günther
-
John Levon
-
Richard W.M. Jones
-
Stefan de Konink