d/xen-utils-common.xen.init: disable oom killer for xenstored
authorHans van Kranenburg <hans@knorrie.org>
Sun, 6 Sep 2020 20:54:15 +0000 (22:54 +0200)
committerHans van Kranenburg <hans@knorrie.org>
Thu, 19 Nov 2020 17:44:33 +0000 (18:44 +0100)
In case of oom killer terminating some process, we'd rather not see
xenstored go. Xenstored has an in-memory database, and when starting the
process again, it would be empty, which is very inconvenient. Xenstored
should already score quite low and have a fairly low memory footprint,
but according to the user report, it happened.

Closes: #961511
Suggested-by: Samuel Thibault <sthibault@debian.org>
Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/xen-utils-common.xen.init

index a38fd00c010c299f6d6cff7f6495791b74ba35e0..1a64d6767e8399aa3490deb1b85fba507c639409 100644 (file)
@@ -226,7 +226,8 @@ xenstored_start()
                eval "try_xenstored=\$$try_xenstored_var"
                if [ -x $try_xenstored ]; then
                        if start-stop-daemon --start --quiet \
-                               --pidfile "$XENSTORED_PIDFILE" --exec "$try_xenstored" -- \
+                               --pidfile "$XENSTORED_PIDFILE" \
+                               --exec /usr/bin/choom -- -n -1000 "$try_xenstored" -- \
                                $XENSTORED_ARGS --pid-file "$XENSTORED_PIDFILE"; then
                                        started_xenstored=$try_xenstored
                                        break