[libvirt] [PATCH v3] daemon: Don't remove pidfiles in init scripts

Daniel P. Berrange berrange at redhat.com
Tue Sep 27 08:50:02 UTC 2011


On Mon, Sep 26, 2011 at 08:17:23PM +0200, Peter Krempa wrote:
> Init scripts removed pid file of the daemon. Removing pid files may be
> harmful as new api for crash-safe pidfiles is used (introduced by
> c8a3a26).
> ---
>  daemon/libvirtd.init.in |    1 -
>  daemon/libvirtd.upstart |    4 ----
>  2 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in
> index 0697a2b..4e610cb 100644
> --- a/daemon/libvirtd.init.in
> +++ b/daemon/libvirtd.init.in
> @@ -74,7 +74,6 @@ stop() {
>      echo
>      if [ $RETVAL -eq 0 ]; then
>          rm -f @localstatedir@/lock/subsys/$SERVICE
> -        rm -f $PIDFILE
>          rm -rf @localstatedir@/cache/libvirt/*
>      else
>          exit $RETVAL
> diff --git a/daemon/libvirtd.upstart b/daemon/libvirtd.upstart
> index fd1d951..f51701a 100644
> --- a/daemon/libvirtd.upstart
> +++ b/daemon/libvirtd.upstart
> @@ -31,9 +31,6 @@ script
>          ulimit -c "$DAEMON_COREFILE_LIMIT"
>      fi
> 
> -    # Clean up a pidfile that might be left around
> -    rm -f /var/run/libvirtd.pid
> -
>      mkdir -p /var/cache/libvirt
>      rm -rf /var/cache/libvirt/*
> 
> @@ -41,6 +38,5 @@ script
>  end script
> 
>  post-stop script
> -    rm -f $PIDFILE
>      rm -rf /var/cache/libvirt/*
>  end script


ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list