From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B8358138307 for ; Wed, 13 Jul 2016 21:37:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4135721C179; Wed, 13 Jul 2016 21:37:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AA82621C179 for ; Wed, 13 Jul 2016 21:37:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D2A69340C53 for ; Wed, 13 Jul 2016 21:37:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DEF9D2440 for ; Wed, 13 Jul 2016 21:37:45 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1468445860.2671b355b97553fbd6696dc82469630fdfcf58c9.robbat2@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/ganeti/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/ganeti/files/ganeti.initd-r3 X-VCS-Directories: app-emulation/ganeti/files/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 2671b355b97553fbd6696dc82469630fdfcf58c9 X-VCS-Branch: master Date: Wed, 13 Jul 2016 21:37:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5779b197-22e1-4004-aebe-1df0c658eb4c X-Archives-Hash: 109b83706b2cae279a8a79a29ac48a3f commit: 2671b355b97553fbd6696dc82469630fdfcf58c9 Author: Robin H. Johnson gentoo org> AuthorDate: Wed Jul 13 21:36:43 2016 +0000 Commit: Robin H. Johnson gentoo 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