[Pkg-ganeti-devel] [ganeti] 09/09: postinst: remove stale PID and socket files

Apollon Oikonomopoulos apoikos-guest at alioth.debian.org
Thu Sep 19 08:13:28 UTC 2013


This is an automated email from the git hooks/post-receive script.

apoikos-guest pushed a commit to branch experimental
in repository ganeti.

commit 4c8433571a78d72bea5144a4a7207dcc118d1cfd
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Thu Sep 19 10:45:50 2013 +0300

    postinst: remove stale PID and socket files
    
    Due to upstream issues #581 and #582, upgrades from previous versions will fail
    to start the Haskell daemons because of wrong PID and socket file ownership. As
    a workaround, we remove the stale files in postinst. No checks against the
    daemons running are done, the daemons are expected to have been stopped during
    prerm.
---
 debian/ganeti.postinst.in |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/debian/ganeti.postinst.in b/debian/ganeti.postinst.in
index 49a5835..4ed6b6c 100644
--- a/debian/ganeti.postinst.in
+++ b/debian/ganeti.postinst.in
@@ -19,6 +19,20 @@ set -e
 case "$1" in
     configure)
 #GANETI_USERS#
+
+	# Remove stale PID files
+	# Ganeti versions prior to 2.8.0~rc4 leave Haskell daemon pidfiles
+	# behind. If these are root-owned, starting the daemons as unprivileged
+	# users will fail.
+
+	# All daemons have been stopped during prerm, so it's safe to remove
+	# their PID files.
+	for daemon in confd mond luxid; do
+		rm -f /var/run/ganeti/ganeti-${daemon}.pid
+	done
+
+	# Also remove luxid's socket
+	rm -f /var/run/ganeti/socket/ganeti-query
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list