summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2016-07-13 14:36:43 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2016-07-13 14:37:40 -0700
commit2671b355b97553fbd6696dc82469630fdfcf58c9 (patch)
tree8418146ea69380335fd40a6d6c125bb8ec9bed44 /app-emulation/ganeti
parentdev-python/qscintilla-python: amd64/x86 stable (diff)
downloadgentoo-2671b355b97553fbd6696dc82469630fdfcf58c9.tar.gz
gentoo-2671b355b97553fbd6696dc82469630fdfcf58c9.tar.bz2
gentoo-2671b355b97553fbd6696dc82469630fdfcf58c9.zip
app-emulation/ganeti: make it easier to restart a downed cluster
Package-Manager: portage-2.2.28
Diffstat (limited to 'app-emulation/ganeti')
-rw-r--r--app-emulation/ganeti/files/ganeti.initd-r314
1 files changed, 14 insertions, 0 deletions
diff --git a/app-emulation/ganeti/files/ganeti.initd-r3 b/app-emulation/ganeti/files/ganeti.initd-r3
index a238aa1ecb84..e255354acdd9 100644
--- a/app-emulation/ganeti/files/ganeti.initd-r3
+++ b/app-emulation/ganeti/files/ganeti.initd-r3
@@ -3,6 +3,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
+extra_commands="forcestart is_master"
+
depend() {
need localmount logger
after bootmisc sshd
@@ -17,6 +19,17 @@ is_master() {
[ "${ganeti_master}" = "${local_hostname}" ]
}
+# This exists specifically for restarting a 2-node cluster where quorum might
+# not be available.
+forcestart() {
+ ewarn "Forcing non-quorum Ganeti master start"
+ GANETI_WCONFD_OPTS="${GANETI_WCONFD_OPTS} --no-voting --yes-do-it"
+ GANETI_LUXID_OPTS="${GANETI_LUXID_OPTS} --no-voting --yes-do-it"
+ GANETI_MASTERD_OPTS="${GANETI_LUXID_OPTS} --no-voting --yes-do-it"
+ export GANETI_WCONFD_OPTS GANETI_LUXID_OPTS GANETI_MASTERD_OPTS
+ start
+}
+
start() {
if ! [ -e ${DAEMON_UTIL} ]; then
eerror "Could not find daemon utility at ${DAEMON_UTIL}"
@@ -39,6 +52,7 @@ start() {
ebegin "Starting ${daemon}"
eindent
+ veinfo ${DAEMON_UTIL} start ${daemon} ${GANETI_OPTS} ${daemon_opts}
${DAEMON_UTIL} start ${daemon} ${GANETI_OPTS} ${daemon_opts} || retval=${?}
if [ ${retval} != 0 ] && [ -n "${started_daemons}" ]; then