version bump for ganeti-2.4.3

This commit is contained in:
2011-08-13 12:15:39 +00:00
parent ed80336eca
commit f9e9f966c4
8 changed files with 375 additions and 0 deletions

View File

@@ -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

View File

@@ -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
}

View File

@@ -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"

View File

@@ -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"
}

View File

@@ -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=""

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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}
!<app-emulation/ganeti-htools-0.3"
pkg_setup () {
confutils_require_any kvm xen
}
src_configure () {
local myconf
if use filestorage ; then
myconf="--with-file-storage-dir=/var/lib/ganeti-storage/file"
else
myconf="--with-file-storage-dir=no"
fi
econf --localstatedir=/var \
--docdir=/usr/share/doc/${P} \
--with-ssh-initscript=/etc/init.d/sshd \
--with-export-dir=/var/lib/ganeti-storage/export \
--with-os-search-path=/usr/share/ganeti/os \
$(use_enable syslog) \
${myconf}
}
src_install () {
emake DESTDIR="${D}" install || die "emake install failed"
newinitd "${FILESDIR}"/ganeti-2.1.initd ganeti
newconfd "${FILESDIR}"/ganeti.confd ganeti
use kvm && newinitd "${FILESDIR}"/ganeti-kvm-poweroff.initd ganeti-kvm-poweroff
use kvm && newconfd "${FILESDIR}"/ganeti-kvm-poweroff.confd ganeti-kvm-poweroff
dobashcompletion doc/examples/bash_completion ganeti
dodoc INSTALL UPGRADE NEWS README doc/*.rst
rm -rf "${D}"/usr/share/doc/ganeti
docinto examples
#dodoc doc/examples/{basic-oob,ganeti.cron,gnt-config-backup}
dodoc doc/examples/{ganeti.cron,gnt-config-backup}
docinto examples/hooks
dodoc doc/examples/hooks/{ipsec,ethers}
keepdir /var/{lib,log,run}/ganeti/
keepdir /usr/share/ganeti/os/
keepdir /var/lib/ganeti-storage/{export,file}/
}
pkg_postinst () {
bash-completion_pkg_postinst
}