[26524] in Source-Commits
/svn/athena r25609 - trunk/debathena/config/reactivate/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue Jul 3 11:44:51 2012
Date: Tue, 3 Jul 2012 11:44:50 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201207031544.q63Fio4T026307@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-07-03 11:44:50 -0400 (Tue, 03 Jul 2012)
New Revision: 25609
Modified:
trunk/debathena/config/reactivate/debian/90debathena-reactivate
trunk/debathena/config/reactivate/debian/changelog
trunk/debathena/config/reactivate/debian/dbus-daemon-launch-helper
trunk/debathena/config/reactivate/debian/reactivate
trunk/debathena/config/reactivate/debian/snapshot-run
Log:
In reactivate:
* Avoid race conditions by inhibiting dbus-daemon-launch-helper during a
chroot shutdown (Trac: #1052, probably)
Modified: trunk/debathena/config/reactivate/debian/90debathena-reactivate
===================================================================
--- trunk/debathena/config/reactivate/debian/90debathena-reactivate 2012-07-02 23:33:31 UTC (rev 25608)
+++ trunk/debathena/config/reactivate/debian/90debathena-reactivate 2012-07-03 15:44:50 UTC (rev 25609)
@@ -16,3 +16,8 @@
sed -i "/^root-users/s/$/,messagebus/" /var/lib/schroot/session/"${SESSION_ID}"
fi
+if [ $STAGE = "setup-stop" ]; then
+ info "Inhibiting dbus-daemon-launch-helper during chroot shutdown"
+ touch /var/run/debathena-inhibit-dbus-helper
+fi
+
Modified: trunk/debathena/config/reactivate/debian/changelog
===================================================================
--- trunk/debathena/config/reactivate/debian/changelog 2012-07-02 23:33:31 UTC (rev 25608)
+++ trunk/debathena/config/reactivate/debian/changelog 2012-07-03 15:44:50 UTC (rev 25609)
@@ -5,8 +5,10 @@
* Use new lightdm-config hooks to actually run session setup and cleanup
* Recover from a 'set -e' failure in snapshot-run and don't leave
chroots lying around if possible
+ * Avoid race conditions by inhibiting dbus-daemon-launch-helper during a
+ chroot shutdown (Trac: #1052, probably)
- -- Jonathan Reed <jdreed@mit.edu> Mon, 02 Jul 2012 15:06:40 -0400
+ -- Jonathan Reed <jdreed@mit.edu> Tue, 03 Jul 2012 11:45:03 -0400
debathena-reactivate (2.0.34) unstable; urgency=low
Modified: trunk/debathena/config/reactivate/debian/dbus-daemon-launch-helper
===================================================================
--- trunk/debathena/config/reactivate/debian/dbus-daemon-launch-helper 2012-07-02 23:33:31 UTC (rev 25608)
+++ trunk/debathena/config/reactivate/debian/dbus-daemon-launch-helper 2012-07-03 15:44:50 UTC (rev 25609)
@@ -8,7 +8,8 @@
[ -x "$HELPER" ] || HELPER="/usr${HELPER}"
[ -x "$HELPER" ] || logger -t "reactivate" "Can't execute $HELPER"
-if [ -n "$session" ] && [ "$(echo "$session" | wc -l)" -eq 1 ]; then
+if [ -n "$session" ] && [ "$(echo "$session" | wc -l)" -eq 1 ] && \
+ ! [ -e /var/run/debathena-inhibit-dbus-helper ]; then
exec schroot -r -c "$session" "$HELPER" "$@"
else
exec "$HELPER" "$@"
Modified: trunk/debathena/config/reactivate/debian/reactivate
===================================================================
--- trunk/debathena/config/reactivate/debian/reactivate 2012-07-02 23:33:31 UTC (rev 25608)
+++ trunk/debathena/config/reactivate/debian/reactivate 2012-07-03 15:44:50 UTC (rev 25609)
@@ -58,3 +58,9 @@
echo "Reboot initiated at $(date)"
reboot
fi
+
+# Yes, we want this here. A reboot will take care of cleaning up
+# /var/run anyway, and since dbus is essential to rebooting these
+# days, we don't want to risk things magically getting spawned inside
+# a crippled chroot
+rm /var/run/debathena-inhibit-dbus-helper
Modified: trunk/debathena/config/reactivate/debian/snapshot-run
===================================================================
--- trunk/debathena/config/reactivate/debian/snapshot-run 2012-07-02 23:33:31 UTC (rev 25608)
+++ trunk/debathena/config/reactivate/debian/snapshot-run 2012-07-03 15:44:50 UTC (rev 25609)
@@ -8,6 +8,11 @@
# around their Xsession or shell. You probably want to run reactivate
# immediately afterwards, as root.
+if [ -e /var/run/debathena-inhibit-dbus-helper ]; then
+ logger -p user.notice -t reactivate "debathena-inhibit-dbus-helper still exists in snapshot-run (shouldn't happen)"
+ rm /var/run/debathena-inhibit-dbus-helper
+fi
+
set -e
cd /