Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 561044 | Differences between
and this patch

Collapse All | Expand All

(-)ganeti.orig (-15 / +1 lines)
Lines 13-24 Link Here
13
13
14
DAEMON_UTIL="/usr/lib/ganeti/daemon-util"
14
DAEMON_UTIL="/usr/lib/ganeti/daemon-util"
15
15
16
is_master() {
17
	[ -z "${ganeti_master}" ] && ganeti_master="$(gnt-cluster getmaster)"
18
	[ -z "${local_hostname}" ] && local_hostname="$(hostname -f)"
19
	[ "${ganeti_master}" = "${local_hostname}" ]
20
}
21
22
# This exists specifically for restarting a 2-node cluster where quorum might
16
# This exists specifically for restarting a 2-node cluster where quorum might
23
# not be available.
17
# not be available.
24
forcestart() {
18
forcestart() {
Lines 43-55 Link Here
43
37
44
	for daemon in $(${DAEMON_UTIL} list-start-daemons); do
38
	for daemon in $(${DAEMON_UTIL} list-start-daemons); do
45
		optsvar="$(printf "${daemon}_OPTS" | tr - _ | LC_ALL=C tr '[:lower:]' '[:upper:]')"
39
		optsvar="$(printf "${daemon}_OPTS" | tr - _ | LC_ALL=C tr '[:lower:]' '[:upper:]')"
46
47
		case "${daemon#ganeti-}" in
48
			masterd|rapi|luxid) is_master || continue;;
49
		esac
50
51
		eval daemon_opts=\"\$\{${optsvar}\}\"
40
		eval daemon_opts=\"\$\{${optsvar}\}\"
52
41
		
53
		ebegin "Starting ${daemon}"
42
		ebegin "Starting ${daemon}"
54
		eindent
43
		eindent
55
		veinfo ${DAEMON_UTIL} start ${daemon} ${GANETI_OPTS} ${daemon_opts}
44
		veinfo ${DAEMON_UTIL} start ${daemon} ${GANETI_OPTS} ${daemon_opts}
Lines 87-95 Link Here
87
	local daemon
76
	local daemon
88
77
89
	for daemon in $(${DAEMON_UTIL} list-stop-daemons) ; do \
78
	for daemon in $(${DAEMON_UTIL} list-stop-daemons) ; do \
90
		case "${daemon#ganeti-}" in
91
			masterd|rapi|luxid) is_master || continue;;
92
		esac
93
		${DAEMON_UTIL} stop ${daemon} ${GANETI_OPTS}
79
		${DAEMON_UTIL} stop ${daemon} ${GANETI_OPTS}
94
	done
80
	done
95
}
81
}

Return to bug 561044