diff options
author | 2011-04-01 11:34:55 +0000 | |
---|---|---|
committer | 2011-04-01 11:34:55 +0000 | |
commit | 2979eb51ad3df8e5141c6989734c253e1428b664 (patch) | |
tree | 1d194c088fe0f6497a5d68f80aa3fdc7ee704410 /sys-cluster | |
parent | Bump to 2.91.93 (diff) | |
download | gentoo-2-2979eb51ad3df8e5141c6989734c253e1428b664.tar.gz gentoo-2-2979eb51ad3df8e5141c6989734c253e1428b664.tar.bz2 gentoo-2-2979eb51ad3df8e5141c6989734c253e1428b664.zip |
Added note about vzeventd. Added support for solid kernel, #361457. Enable reboot notification, fixes #361453. Thank Andreis_Vinogradovs (slepnoga) for finding all of this.
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/vzctl/ChangeLog | 10 | ||||
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch | 85 | ||||
-rw-r--r-- | sys-cluster/vzctl/vzctl-3.0.26.2-r1.ebuild | 84 | ||||
-rw-r--r-- | sys-cluster/vzctl/vzctl-9999.ebuild | 22 |
4 files changed, 185 insertions, 16 deletions
diff --git a/sys-cluster/vzctl/ChangeLog b/sys-cluster/vzctl/ChangeLog index 04b8154af326..072791fa58f9 100644 --- a/sys-cluster/vzctl/ChangeLog +++ b/sys-cluster/vzctl/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-cluster/vzctl # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.74 2011/03/22 16:28:14 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.75 2011/04/01 11:34:55 pva Exp $ + +*vzctl-3.0.26.2-r1 (01 Apr 2011) + + 01 Apr 2011; Peter Volkov <pva@gentoo.org> +vzctl-3.0.26.2-r1.ebuild, + +files/vzctl-3.0.26.2-vzeventd.patch, vzctl-9999.ebuild: + Added note about vzeventd. Added support for solid kernel, #361457. Enable + reboot notification, fixes #361453. Thank Andreis_Vinogradovs (slepnoga) for + finding all of this. *vzctl-3.0.26.2 (22 Mar 2011) diff --git a/sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch b/sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch new file mode 100644 index 000000000000..620c86dceb9c --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.26.2-vzeventd.patch @@ -0,0 +1,85 @@ +From f24b1603090c6d4af163d42eff620fcfaa7c6297 Mon Sep 17 00:00:00 2001 +From: Peter Volkov <pva@gentoo.org> +Date: Fri, 1 Apr 2011 14:25:45 +0400 +Subject: [PATCH] vzeventd-gentoo: set reboot_event, solid kernel + +Allow it to work when modules are built in (MODULES_DISABLED=yes). +Set /sys/module/vzevent/parameters/reboot_event=1 on service startup. +Small clenups. + +Fixes Gentoo bugs: +http://bugs.gentoo.org/show_bug.cgi?id=361453 +http://bugs.gentoo.org/show_bug.cgi?id=361457 +--- + etc/init.d/vzeventd-gentoo.in | 40 ++++++++++++++++++++++++++++------------ + 1 files changed, 28 insertions(+), 12 deletions(-) + +diff --git a/etc/init.d/vzeventd-gentoo.in b/etc/init.d/vzeventd-gentoo.in +index e8fe64e..2c0da26 100644 +--- a/etc/init.d/vzeventd-gentoo.in ++++ b/etc/init.d/vzeventd-gentoo.in +@@ -6,25 +6,41 @@ depend() { + } + + check_config() { +-# if we don't want openvz running, say so ++ source /etc/conf.d/vz ++ # if we don't want openvz running, say so + [ "${VIRTUOZZO}" = "yes" ] || return 1 + : ${VZEVENTD:=@SBINDIR@/vzeventd} + } + ++load_module() { ++ if [ "${MODULES_DISABLED}" != "yes" ]; then ++ local rv=0 ++ ebegin "Loading vzevent module" ++ modprobe -r vzevent >/dev/null 2>&1 ++ modprobe vzevent reboot_event=1 >/dev/null 2>&1 ++ rv=$? ++ if [ ${rv} -ne 0 ]; then ++ eend ${rv} ++ return ${rv} ++ fi ++ fi ++ ++ local param=/sys/module/vzevent/parameters/reboot_event ++ if ! grep -Fqw 1 "${param}"; then ++ ewarn "vzevent module should be loaded with reboot_event=1 parameter" ++ ewarn "setting reboot_event to 1..." ++ ewarn "echo 1 > ${param}" ++ echo 1 > "${param}" ++ fi ++ return 0 ++} ++ + start() { + check_config || return +- ebegin "Loading vzevent module" +- modprobe -r vzevent >/dev/null 2>&1 +- modprobe vzevent reboot_event=1 >/dev/null 2>&1 +- rc=$? +- if [ ${rc} -ne 0 ]; then +- eend ${rc} "failed" +- return ${rc} +- fi +- eend ${rc} ++ load_module || return + + ebegin "Starting vzeventd" +- start-stop-daemon --start --exec $VZEVENTD \ ++ start-stop-daemon --start --exec ${VZEVENTD} \ + --pidfile /var/run/vzeventd.pid \ + -- ${VZEVENTD_OPTS} + eend $? +@@ -33,7 +49,7 @@ start() { + stop() { + check_config || return + ebegin "Stopping vzeventd" +- start-stop-daemon --stop --exec $VZEVENTD \ ++ start-stop-daemon --stop --exec ${VZEVENTD} \ + --pidfile /var/run/vzeventd.pid + eend $? + } +-- +1.7.3.4 + diff --git a/sys-cluster/vzctl/vzctl-3.0.26.2-r1.ebuild b/sys-cluster/vzctl/vzctl-3.0.26.2-r1.ebuild new file mode 100644 index 000000000000..723f495000f3 --- /dev/null +++ b/sys-cluster/vzctl/vzctl-3.0.26.2-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.26.2-r1.ebuild,v 1.1 2011/04/01 11:34:55 pva Exp $ + +EAPI="4" + +inherit bash-completion eutils + +DESCRIPTION="OpenVZ ConTainers control utility" +HOMEPAGE="http://openvz.org/" +SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86" +IUSE="bash-completion" + +RDEPEND=" + net-firewall/iptables + sys-apps/ed + sys-apps/iproute2 + sys-fs/vzquota" + +DEPEND="${RDEPEND}" + +src_prepare() { + # Set default OSTEMPLATE on gentoo + sed -e 's:=redhat-:=gentoo-:' -i etc/dists/default || die + epatch "${FILESDIR}/vzctl-3.0.26.2-vzeventd.patch" +} + +src_configure() { + econf \ + --localstatedir=/var \ + --enable-udev \ + $(use_enable bash-completion bashcomp) \ + --enable-logrotate +} + +src_install() { + emake DESTDIR="${D}" install install-gentoo + + # install the bash-completion script into the right location + rm -rf "${ED}"/etc/bash_completion.d + dobashcompletion etc/bash_completion.d/vzctl.sh vzctl + + # We need to keep some dirs + keepdir /vz/{dump,lock,root,private,template/cache} + keepdir /etc/vz/names /var/lib/vzctl/veip +} + +pkg_postinst() { + bash-completion_pkg_postinst + local conf_without_OSTEMPLATE + for file in \ + $(find "${EROOT}/etc/vz/conf/" \( -name *.conf -a \! -name 0.conf \)); do + if ! grep '^OSTEMPLATE' $file > /dev/null; then + conf_without_OSTEMPLATE+=" $file" + fi + done + + if [[ -n ${conf_without_OSTEMPLATE} ]]; then + ewarn + ewarn "OSTEMPLATE default was changed from redhat-like to gentoo." + ewarn "This means that any VEID.conf files without explicit or correct" + ewarn "OSTEMPLATE set will use gentoo scripts instead of redhat." + ewarn "Please check the following configs:" + for file in ${conf_without_OSTEMPLATE}; do + ewarn "${file}" + done + ewarn + fi + + ewarn "To avoid loosing network to CTs on iface down/up, please, add the" + ewarn "following code to /etc/conf.d/net:" + ewarn " postup() {" + ewarn " /usr/sbin/vzifup-post \${IFACE}" + ewarn " }" + ewarn + ewarn "Starting with 3.0.25 there is new vzeventd service to reboot CTs." + ewarn "Please, drop /usr/share/vzctl/scripts/vpsnetclean and" + ewarn "/usr/share/vzctl/scripts/vpsreboot from crontab and use" + ewarn "/etc/init.d/vzeventd." +} diff --git a/sys-cluster/vzctl/vzctl-9999.ebuild b/sys-cluster/vzctl/vzctl-9999.ebuild index 878f72541c08..d6164a8fc425 100644 --- a/sys-cluster/vzctl/vzctl-9999.ebuild +++ b/sys-cluster/vzctl/vzctl-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild,v 1.6 2011/03/22 16:28:14 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-9999.ebuild,v 1.7 2011/04/01 11:34:55 pva Exp $ EAPI="4" @@ -19,8 +19,7 @@ RDEPEND=" net-firewall/iptables sys-apps/ed sys-apps/iproute2 - sys-fs/vzquota - virtual/cron" + sys-fs/vzquota" DEPEND="${RDEPEND}" @@ -77,16 +76,9 @@ pkg_postinst() { ewarn " postup() {" ewarn " /usr/sbin/vzifup-post \${IFACE}" ewarn " }" - - elog "NOTE: Starting with vzctl-3.0.22 the mechanism for choosing the" - elog "interfaces to send ARP requests to has been improved (see description" - elog "of NEIGHBOUR_DEVS in vz.conf(5) man page). In case CT IP addresses" - elog "are not on the same subnet as HN IPs, it may lead to such CTs being" - elog "unreachable from the outside world." - elog - elog "The solution is to set up a device route(s) for the network your CTs are" - elog "in. For more details, see http://bugzilla.openvz.org/show_bug.cgi?id=771#c1" - elog - elog "The old vzctl behavior can be restored by setting NEIGHBOUR_DEVS to any" - elog 'value other than "detect" in /etc/vz/vz.conf.' + ewarn + ewarn "Starting with 3.0.25 there is new vzeventd service to reboot CTs." + ewarn "Please, drop /usr/share/vzctl/scripts/vpsnetclean and" + ewarn "/usr/share/vzctl/scripts/vpsreboot from crontab and use" + ewarn "/etc/init.d/vzeventd." } |