public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/ganeti/files/
Date: Wed, 13 Jul 2016 21:37:45 +0000 (UTC)	[thread overview]
Message-ID: <1468445860.2671b355b97553fbd6696dc82469630fdfcf58c9.robbat2@gentoo> (raw)

commit:     2671b355b97553fbd6696dc82469630fdfcf58c9
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 21:36:43 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 21:37:40 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2671b355

app-emulation/ganeti: make it easier to restart a downed cluster

Package-Manager: portage-2.2.28

 app-emulation/ganeti/files/ganeti.initd-r3 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/app-emulation/ganeti/files/ganeti.initd-r3 b/app-emulation/ganeti/files/ganeti.initd-r3
index a238aa1..e255354 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


             reply	other threads:[~2016-07-13 21:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 21:37 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-08  1:30 [gentoo-commits] repo/gentoo:master commit in: app-emulation/ganeti/files/ Patrick McLean
2017-12-12 17:08 Matthias Maier
2017-01-07  0:37 Robin H. Johnson
2016-07-12  0:53 Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468445860.2671b355b97553fbd6696dc82469630fdfcf58c9.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox