* [gentoo-commits] gentoo-x86 commit in app-emulation/ganeti/files: ganeti-2.11-daemon-util.patch ganeti-2.11-start-stop-daemon-args.patch ganeti-2.11-add-pgrep.patch
@ 2014-06-18 18:50 Patrick McLean (chutzpah)
0 siblings, 0 replies; only message in thread
From: Patrick McLean (chutzpah) @ 2014-06-18 18:50 UTC (permalink / raw
To: gentoo-commits
chutzpah 14/06/18 18:50:58
Added: ganeti-2.11-daemon-util.patch
ganeti-2.11-start-stop-daemon-args.patch
ganeti-2.11-add-pgrep.patch
Log:
Revision bump, some minor ebuild cleanups. Add a --wait to start-stop-daemon arguments in daemon-util to make sure that the ganeti daemons actually start. Add patch contributed by 'Zentoo' for daemon-util to make restart-all handle master/node differences properly (bug #513600).
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xE3F69979BB4B8928DA78E3D17CBF44EF)
Revision Changes Path
1.1 app-emulation/ganeti/files/ganeti-2.11-daemon-util.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.11-daemon-util.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.11-daemon-util.patch?rev=1.1&content-type=text/plain
Index: ganeti-2.11-daemon-util.patch
===================================================================
diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
index 01f2cbb..de4e396 100644
--- a/daemons/daemon-util.in
+++ b/daemons/daemon-util.in
@@ -22,18 +22,25 @@ set -e
@SHELL_ENV_INIT@
-readonly defaults_file="$SYSCONFDIR/default/ganeti"
+readonly defaults_file="$SYSCONFDIR/conf.d/ganeti"
# This is a list of all daemons and the order in which they're started. The
# order is important as there are dependencies between them. On shutdown,
# they're stopped in reverse order.
-DAEMONS=(
- ganeti-noded
- ganeti-masterd
- ganeti-rapi
- ganeti-luxid
- ganeti-kvmd
- )
+
+DAEMONS=( ganeti-noded )
+
+_is_master() {
+ [ -z "${ganeti_master}" ] && ganeti_master="$(gnt-cluster getmaster)"
+ [ -z "${local_hostname}" ] && local_hostname="$(hostname -f)"
+ [ "${ganeti_master}" = "${local_hostname}" ]
+}
+
+if _is_master; then
+ DAEMONS+=( ganeti-masterd ganeti-rapi ganeti-luxid )
+fi
+
+DAEMONS+=( ganeti-kvmd )
_confd_enabled() {
[[ "@CUSTOM_ENABLE_CONFD@" == True ]]
1.1 app-emulation/ganeti/files/ganeti-2.11-start-stop-daemon-args.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.11-start-stop-daemon-args.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.11-start-stop-daemon-args.patch?rev=1.1&content-type=text/plain
Index: ganeti-2.11-start-stop-daemon-args.patch
===================================================================
diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
index 4d1d7c5..3deeab7 100644
--- a/daemons/daemon-util.in
+++ b/daemons/daemon-util.in
@@ -246,10 +246,11 @@ start() {
@PKGLIBDIR@/ensure-dirs
if type -p start-stop-daemon >/dev/null; then
- start-stop-daemon --start --quiet --oknodo \
+ start-stop-daemon --start --quiet \
--pidfile $pidfile \
- --startas $daemonexec \
- --chuid $usergroup \
+ --exec $daemonexec \
+ --user $usergroup \
+ --wait 300 \
-- $args "$@"
else
# TODO: Find a way to start daemon with a group, until then the group must
@@ -273,7 +274,7 @@ stop() {
local pidfile=$(_daemon_pidfile $name)
if type -p start-stop-daemon >/dev/null; then
- start-stop-daemon --stop --quiet --oknodo --retry 30 \
+ start-stop-daemon --stop --quiet --retry 30 \
--pidfile $pidfile
else
_ignore_error killproc -p $pidfile $name
1.1 app-emulation/ganeti/files/ganeti-2.11-add-pgrep.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.11-add-pgrep.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/ganeti/files/ganeti-2.11-add-pgrep.patch?rev=1.1&content-type=text/plain
Index: ganeti-2.11-add-pgrep.patch
===================================================================
diff --git a/daemons/daemon-util.in b/daemons/daemon-util.in
index 656dc95..01f2cbb 100644
--- a/daemons/daemon-util.in
+++ b/daemons/daemon-util.in
@@ -246,12 +246,14 @@ start() {
@PKGLIBDIR@/ensure-dirs
if type -p start-stop-daemon >/dev/null; then
- start-stop-daemon --start --quiet \
- --pidfile $pidfile \
- --exec $daemonexec \
- --user $usergroup \
- --wait 300 \
- -- $args "$@"
+ if ! ret=$(/usr/bin/pgrep $name) ; then
+ start-stop-daemon --start --quiet \
+ --pidfile $pidfile \
+ --exec $daemonexec \
+ --user $usergroup \
+ --wait 300 \
+ -- $args "$@"
+ fi
else
# TODO: Find a way to start daemon with a group, until then the group must
# be removed
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-18 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 18:50 [gentoo-commits] gentoo-x86 commit in app-emulation/ganeti/files: ganeti-2.11-daemon-util.patch ganeti-2.11-start-stop-daemon-args.patch ganeti-2.11-add-pgrep.patch Patrick McLean (chutzpah)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox