From f9e9f966c40ee1a67a4abee04c9d9890c199ca9e Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 13 Aug 2011 12:15:39 +0000 Subject: [PATCH] version bump for ganeti-2.4.3 --- app-emulation/ganeti/Manifest | 8 ++ app-emulation/ganeti/files/ganeti-2.1.initd | 97 +++++++++++++++++++ .../ganeti/files/ganeti-kvm-poweroff.confd | 4 + .../ganeti/files/ganeti-kvm-poweroff.initd | 58 +++++++++++ app-emulation/ganeti/files/ganeti.confd | 10 ++ app-emulation/ganeti/files/ganeti.initd | 57 +++++++++++ app-emulation/ganeti/files/ganeti2.initd | 55 +++++++++++ app-emulation/ganeti/ganeti-2.4.3.ebuild | 86 ++++++++++++++++ 8 files changed, 375 insertions(+) create mode 100644 app-emulation/ganeti/Manifest create mode 100644 app-emulation/ganeti/files/ganeti-2.1.initd create mode 100644 app-emulation/ganeti/files/ganeti-kvm-poweroff.confd create mode 100644 app-emulation/ganeti/files/ganeti-kvm-poweroff.initd create mode 100644 app-emulation/ganeti/files/ganeti.confd create mode 100644 app-emulation/ganeti/files/ganeti.initd create mode 100644 app-emulation/ganeti/files/ganeti2.initd create mode 100644 app-emulation/ganeti/ganeti-2.4.3.ebuild diff --git a/app-emulation/ganeti/Manifest b/app-emulation/ganeti/Manifest new file mode 100644 index 0000000..b0bbfff --- /dev/null +++ b/app-emulation/ganeti/Manifest @@ -0,0 +1,8 @@ +AUX ganeti-2.1.initd 2014 RMD160 44996bf7d50b8ac70df572daafa5f5d04be021a8 SHA1 ceda61da3b3099292f4cd5ab41b5e02f2666dc6b SHA256 37fd18b914846e5fb8d984db7162b230ac3488ec530aaddda7b63bd72cc70117 +AUX ganeti-kvm-poweroff.confd 186 RMD160 87242c3c785e012b2ec7534836dabd8017a25893 SHA1 955bdc02481591c06d8e00f1b6e04c55830e1150 SHA256 d811f1825351b03653aed4b6827b2b0c9dd1dc3340c980862c0758b3bf5ad21e +AUX ganeti-kvm-poweroff.initd 1621 RMD160 2d8d59ac9bf25ff6efa74a3277f4d295c05d4282 SHA1 7e3cbfb9f6ed988393522af6569a96c66cb4feb0 SHA256 bb7b6ab5ac2899969bab52d9c5e1c5d9fd9629d247563ff74e8b9f64a4478e28 +AUX ganeti.confd 248 RMD160 18662964365f102e77f593429bb0772d94c65267 SHA1 337999b3fbeb64518f3d39c41634e3f414aedb25 SHA256 7efc3a5052ad5c2085605a8c0bf9e9bb9cf20c0623263b7abcd0b7a0cb9a895b +AUX ganeti.initd 1159 RMD160 3d3f56cbef2852625abdfc7f47d711b844c42780 SHA1 c74485c40329cdd129eeebfdb38f47973dd4b3a5 SHA256 86f30236349528647e7b78d2e72963e9cda5f6998ebb314e44387bef5eab1f66 +AUX ganeti2.initd 1503 RMD160 4af84c353f6638af31a94a5274e922237ae2fd00 SHA1 a46268352d11fb6450362c9a0d72655ded6b5b6f SHA256 6fd666648ac543ffcc3700821a36eba9a027eb04278e53f60e07ce8989de3fb8 +DIST ganeti-2.4.3.tar.gz 1826541 RMD160 3b696e2af48adc7ccbbbe6e0dd9c63ccd8525302 SHA1 72cd24f299a8e444369fe235e57209709f6880e8 SHA256 44742bb2ef87895730e6a869a83d4a3b6a62df3a437eb0acd594fd21df78421d +EBUILD ganeti-2.4.3.ebuild 2404 RMD160 15ba8fef47929ad3f1038966b770fbeed8267fc3 SHA1 a6020d1c327902599ce981d9f9bb5f3b731324cb SHA256 77150e37b744e456104878828ac8bd8cc81127bee113b021ba83e03ec1803f6c diff --git a/app-emulation/ganeti/files/ganeti-2.1.initd b/app-emulation/ganeti/files/ganeti-2.1.initd new file mode 100644 index 0000000..19f2ec5 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-2.1.initd @@ -0,0 +1,97 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/files/ganeti-2.1.initd,v 1.3 2010/03/07 20:56:02 ramereth Exp $ + +depend() { + need localmount + after bootmisc +} + +NODED="ganeti-noded" +MASTERD="ganeti-masterd" +CONFD="ganeti-confd" +RAPI="ganeti-rapi" +DAEMON_UTIL="/usr/lib/ganeti/daemon-util" + +check_config() { + for fname in /var/lib/ganeti/server.pem + do + if [[ ! -f "$fname" ]] + then + eerror "Config file $fname not found, will not run." + return 1 + fi + done + + return 0 +} + +check_exitcode() { + RC=${1} + case ${RC} in + 0) + eend 0 + ;; + 11) + eend 0 "not master" + ;; + *) + eend 1 "exit code $RC" + ;; + esac +} + +start_action() { + # called as start_action daemon-name + local daemon="${1}" + ebegin "Starting ${daemon}" + ${DAEMON_UTIL} start "${@}" + check_exitcode ${?} +} + +stop_action() { + # called as stop_action daemon-name + local daemon="${1}" + ebegin "Stopping ${daemon}" + ${DAEMON_UTIL} stop "${@}" + check_exitcode ${?} +} + +maybe_do() { + requested="${1}"; shift + action="${1}"; shift + target="${1}" + if [ -z "${requested}" -o "${requested}" = "${target}" ] ; then + ${action} "${@}" + fi +} + +start_all() { + check_config + for i in ${NODED} ${MASTERD} ${CONFD} ${RAPI}; do \ + case "${i}" in + ganeti-masterd) + GANETI_OPTS="${GANETI_OPTS} ${GANETI_MASTERD_OPTS}" + ;; + ganeti-rapid) + GANETI_OPTS="${GANETI_OPTS} ${GANETI_RAPI_OPTS}" + ;; + esac + maybe_do "${1}" start_action ${i} ${GANETI_OPTS} + done +} + +stop_all() { + for i in ${RAPI} ${CONFD} ${MASTERD} ${NODED}; do \ + maybe_do "${1}" stop_action ${i} + done +} + +start() { + start_all +} + +stop() { + stop_all +} diff --git a/app-emulation/ganeti/files/ganeti-kvm-poweroff.confd b/app-emulation/ganeti/files/ganeti-kvm-poweroff.confd new file mode 100644 index 0000000..6ab21c3 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-kvm-poweroff.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/ganeti-kvm-poweroff: config file for /etc/init.d/ganeti-kvm-poweroff + +# Maximum time in seconds to wait until KVM VMs shutdown before giving up. +# GANETI_KVM_TIMEOUT="60" diff --git a/app-emulation/ganeti/files/ganeti-kvm-poweroff.initd b/app-emulation/ganeti/files/ganeti-kvm-poweroff.initd new file mode 100644 index 0000000..93d3521 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti-kvm-poweroff.initd @@ -0,0 +1,58 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/files/ganeti-kvm-poweroff.initd,v 1.1 2011/01/22 02:07:43 ramereth Exp $ + +depend() { + after ganeti + after bootmisc +} + +CONTROL_PATH="/var/run/ganeti/kvm-hypervisor/ctrl" +GANETI_KVM_TIMEOUT=${GANETI_KVM_TIMEOUT:-60} + +start() { + return 0 +} + +# Taken from doc/examples/ganeti-kvm-poweroff.initd.in in ganeti package +stop() { + ebegin "Stopping Ganeti KVM VMs" + # shutdown VMs and remove sockets of those not running + for vm_monitor in $(find $CONTROL_PATH -type s -name '*.monitor') ; do + if ! echo system_powerdown | \ + socat -U UNIX:$vm_monitor STDIO > /dev/null 2>&1; then + # remove disconnected socket + rm -f $vm_monitor + fi + done + + einfo " Waiting for VMs to poweroff" + waiting=true + remaining=$GANETI_KVM_TIMEOUT + while $waiting && [ $remaining -ne 0 ]; do + if [ -z "$(find $CONTROL_PATH -type s -name '*.monitor')" ] ; then + break + fi + + echo -n "." + for vm_monitor in $(find $CONTROL_PATH -type s -name '*.monitor') ; do + if ! echo | socat -U UNIX:$vm_monitor STDIO > /dev/null 2>&1; then + rm -rf $vm_monitor + fi + done + + sleep 5 + let remaining-=5 1 + done + + if [ -n "$(find $CONTROL_PATH -type s -name '*.monitor')" ] ; then + eerror " Some ganeti VMs did not shutdown" + fi + echo + eend $? +} + +restart() { + eerror "restart not supported" +} diff --git a/app-emulation/ganeti/files/ganeti.confd b/app-emulation/ganeti/files/ganeti.confd new file mode 100644 index 0000000..b79a278 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti.confd @@ -0,0 +1,10 @@ +# /etc/conf.d/ganeti: config file for /etc/init.d/ganeti + +# Extra options to pass to all of the ganeti daemons +# GANETI_OPTS="-d" + +# Options to pass to ganeti-masterd +# GANETI_MASTERD_OPTS="" + +# Options to pass to ganeti-rapi +# GANETI_RAPI_OPTS="" diff --git a/app-emulation/ganeti/files/ganeti.initd b/app-emulation/ganeti/files/ganeti.initd new file mode 100644 index 0000000..8e4a55f --- /dev/null +++ b/app-emulation/ganeti/files/ganeti.initd @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/files/ganeti.initd,v 1.3 2011/03/29 22:12:25 ramereth Exp $ + +depend() { + need localmount xend drbd + before ganeti-kvm-poweroff + after bootmisc nfsmount +} + +checkconfig() { + for fname in /var/lib/ganeti/ssconf_node_pass /var/lib/ganeti/server.pem + do + if [[ ! -f "$fname" ]] + then + eerror "Config file $fname not found, will not run." + return 1 + fi + done + + return 0 +} + +start() { + checkconfig || return 1 + + ebegin "Starting ganeti-master" + /usr/sbin/ganeti-master start + ret=$? + eend ${ret} + [[ "${ret}" != 0 ]] && return 1 + + ebegin "Starting ganeti-noded" + start-stop-daemon --start --quiet --exec /usr/sbin/ganeti-noded + ret=$? + eend ${ret} + [[ "${ret}" != 0 ]] && return 1 + + return 0 +} + +stop() { + ebegin "Stopping ganeti-noded" + start-stop-daemon --stop --quiet --name ganeti-noded + ret=$? + eend ${ret} + [[ "${ret}" != 0 ]] && return 1 + + ebegin "Stopping ganeti-master" + /usr/sbin/ganeti-master start + ret=$? + eend ${ret} + [[ "${ret}" != 0 ]] && return 1 + + return 0 +} diff --git a/app-emulation/ganeti/files/ganeti2.initd b/app-emulation/ganeti/files/ganeti2.initd new file mode 100644 index 0000000..924f7e6 --- /dev/null +++ b/app-emulation/ganeti/files/ganeti2.initd @@ -0,0 +1,55 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/files/ganeti2.initd,v 1.1 2009/10/02 22:12:19 ramereth Exp $ + +depend() { + need localmount drbd + after bootmisc +} + +checkconfig() { + for fname in /var/lib/ganeti/server.pem + do + if [[ ! -f "$fname" ]] + then + eerror "Config file $fname not found, will not run." + return 1 + fi + done + + return 0 +} + +start_action() { + # called as start_action daemon pidfile + local daemon="${1}"; shift + local pidfile="${1}"; shift + ebegin "Starting ${daemon}" + start-stop-daemon --start --quiet --exec "${daemon}" --pidfile "${pidfile}" \ + -- "${@}" + eend ${?} +} + +stop_action() { + # called as stop_action daemon pidfile + ebegin "Stopping ${1}" + start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile "${2}" + eend ${?} +} + + +start() { + checkconfig || return 1 + start_action /usr/sbin/ganeti-noded /var/run/ganeti/ganeti-noded.pid + start_action /usr/sbin/ganeti-masterd /var/run/ganeti/ganeti-masterd.pid + start_action /usr/sbin/ganeti-rapi /var/run/ganeti/ganeti-rapi.pid + return 0 +} + +stop() { + stop_action /usr/sbin/ganeti-rapi /var/run/ganeti/ganeti-rapi.pid + stop_action /usr/sbin/ganeti-masterd /var/run/ganeti/ganeti-masterd.pid + stop_action /usr/sbin/ganeti-noded /var/run/ganeti/ganeti-noded.pid + return 0 +} diff --git a/app-emulation/ganeti/ganeti-2.4.3.ebuild b/app-emulation/ganeti/ganeti-2.4.3.ebuild new file mode 100644 index 0000000..bc65ae9 --- /dev/null +++ b/app-emulation/ganeti/ganeti-2.4.3.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/ganeti/ganeti-2.4.2.ebuild,v 1.1 2011/05/12 17:46:25 ramereth Exp $ + +EAPI=2 + +inherit eutils confutils bash-completion + +MY_PV="${PV/_rc/~rc}" +#MY_PV="${PV/_beta/~beta}" +MY_P="${PN}-${MY_PV}" +DESCRIPTION="Ganeti is a virtual server management software tool" +HOMEPAGE="http://code.google.com/p/ganeti/" +SRC_URI="http://ganeti.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kvm xen drbd +filestorage syslog ipv6" + +S="${WORKDIR}/${MY_P}" + +DEPEND="xen? ( >=app-emulation/xen-3.0 ) + kvm? ( app-emulation/qemu-kvm ) + drbd? ( >=sys-cluster/drbd-8.3 ) + ipv6? ( net-misc/ndisc6 ) + dev-libs/openssl + dev-python/paramiko + dev-python/pyopenssl + dev-python/pyparsing + dev-python/pycurl + dev-python/pyinotify + dev-python/simplejson + net-analyzer/arping + net-misc/bridge-utils + net-misc/curl[ssl] + net-misc/openssh + net-misc/socat + sys-apps/iproute2 + sys-fs/lvm2" +RDEPEND="${DEPEND} + !