diff options
-rw-r--r-- | sys-cluster/vzctl/ChangeLog | 10 | ||||
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch | 42 | ||||
-rw-r--r-- | sys-cluster/vzctl/vzctl-3.0.22-r11.ebuild (renamed from sys-cluster/vzctl/vzctl-3.0.22-r10.ebuild) | 13 | ||||
-rw-r--r-- | sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild | 81 |
4 files changed, 139 insertions, 7 deletions
diff --git a/sys-cluster/vzctl/ChangeLog b/sys-cluster/vzctl/ChangeLog index f5635c0de83c..2ab34c652df0 100644 --- a/sys-cluster/vzctl/ChangeLog +++ b/sys-cluster/vzctl/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-cluster/vzctl # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.58 2008/10/13 09:35:18 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.59 2008/11/08 19:41:59 pva Exp $ + +*vzctl-3.0.22-r11 (08 Nov 2008) +*vzctl-3.0.22-r2 (08 Nov 2008) + + 08 Nov 2008; Peter Volkov <pva@gentoo.org> + +files/vzctl-3.0.22-adjust-meminfo.patch, +vzctl-3.0.22-r2.ebuild, + -vzctl-3.0.22-r10.ebuild, +vzctl-3.0.22-r11.ebuild: + Patch to fix adjusting of memory limits without VE restart. 13 Oct 2008; Peter Volkov <pva@gentoo.org> -files/vzctl-3.0.16-prevent-stripping.patch, -vzctl-3.0.18-r1.ebuild, diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch new file mode 100644 index 000000000000..f26a789b6fd9 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch @@ -0,0 +1,42 @@ +From: Igor Sukhih <igor@openvz.org> +Date: Thu, 30 Oct 2008 13:00:46 +0000 (+0300) +Subject: vzctl: adjust /proc/meminfo when privvmpages or --meminfo changes +X-Git-Tag: vzctl-3.0.23~1 +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=17705858ad37d34c2caa3f89d3af5bf2ad34073a;hp=372cd4f09f58a62a3dc05152ae288ad2b083a5b2 + +vzctl: adjust /proc/meminfo when privvmpages or --meminfo changes + +Fixes http://bugzilla.openvz.org/623 +--- + +diff --git a/src/lib/meminfo.c b/src/lib/meminfo.c +index 6c686ad..c4102c0 100644 +--- a/src/lib/meminfo.c ++++ b/src/lib/meminfo.c +@@ -51,13 +51,20 @@ int vps_meminfo_set(vps_handler *h, envid_t veid, meminfo_param *gparam, + /* update meminfo on --privvmpages, --meminfo */ + if (param->mode < 0 && privvmpages == NULL) + return 0; +- if (gparam->mode < 0 && vps_p->g_param != NULL) { +- param = &vps_p->g_param->res.meminfo; +- if (param->mode != VE_MEMINFO_PRIVVMPAGES) +- return 0; ++ if (vps_p->g_param != NULL) { ++ if (privvmpages == NULL) ++ /* use privvmpages from VE.conf on --meminfo */ ++ privvmpages = vps_p->g_param->res.ub.privvmpages; ++ ++ if (param->mode < 0) { ++ /* use meminfo from VE.conf on --privvmpages */ ++ param = &vps_p->g_param->res.meminfo; ++ if (param->mode < 0) ++ param = &default_param; ++ if (param->mode != VE_MEMINFO_PRIVVMPAGES) ++ return 0; ++ } + } +- if (privvmpages == NULL && vps_p->g_param != NULL) +- privvmpages = vps_p->g_param->res.ub.privvmpages; + } + if (param->mode < 0) + param = &default_param; diff --git a/sys-cluster/vzctl/vzctl-3.0.22-r10.ebuild b/sys-cluster/vzctl/vzctl-3.0.22-r11.ebuild index f9cf8084db47..49f724ad81a1 100644 --- a/sys-cluster/vzctl/vzctl-3.0.22-r10.ebuild +++ b/sys-cluster/vzctl/vzctl-3.0.22-r11.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.22-r10.ebuild,v 1.1 2008/10/13 09:25:59 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.22-r11.ebuild,v 1.1 2008/11/08 19:41:59 pva Exp $ inherit bash-completion eutils @@ -26,11 +26,12 @@ src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}"/${P}-capability-fix.patch - epatch "${FILESDIR}"/${P}-glibc28.patch - epatch "${FILESDIR}"/${P}-document-disable-modules.patch - epatch "${FILESDIR}"/${P}-workaround-gentoo-add_ip.patch - epatch "${FILESDIR}"/${P}-scripts-openrc.patch + epatch "${FILESDIR}/${P}-capability-fix.patch" + epatch "${FILESDIR}/${P}-glibc28.patch" + epatch "${FILESDIR}/${P}-document-disable-modules.patch" + epatch "${FILESDIR}/${P}-workaround-gentoo-add_ip.patch" + epatch "${FILESDIR}/${P}-scripts-openrc.patch" + epatch "${FILESDIR}/${P}-adjust-meminfo.patch" } src_compile() { diff --git a/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild b/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild new file mode 100644 index 000000000000..9f637386dd7c --- /dev/null +++ b/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild,v 1.1 2008/11/08 19:41:59 pva Exp $ + +inherit bash-completion eutils + +DESCRIPTION="OpenVZ VE 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 logrotate" + +RDEPEND="logrotate? ( app-admin/logrotate ) + net-firewall/iptables + sys-apps/ed + sys-apps/iproute2 + sys-fs/vzquota + virtual/cron" + +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-capability-fix.patch" + epatch "${FILESDIR}/${P}-glibc28.patch" + epatch "${FILESDIR}/${P}-document-disable-modules.patch" + epatch "${FILESDIR}/${P}-workaround-gentoo-add_ip.patch" + epatch "${FILESDIR}/${P}-adjust-meminfo.patch" +} + +src_compile() { + econf --localstatedir=/var \ + --enable-cron \ + --enable-udev \ + $(use_enable bash-completion bashcomp) \ + $(use_enable logrotate) || die "econf failed!" + + emake || die "emake failed!" +} + +src_install() { + make DESTDIR="${D}" install install-gentoo || die "make install failed" + + # install the bash-completion script into the right location + rm -rf "${D}"/etc/bash_completion.d + dobashcompletion "${S}"/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 + ewarn + if has_version "<sys-cluster/vzctl-3.0.10"; then + ewarn "The location of some vzctl files have changed. Most notably," + ewarn "VE configuration files and samples directory has changed from" + ewarn "/etc/vz to /etc/vz/conf. In order to be able to work with" + ewarn "your VEs, please do the following:" + ewarn + ewarn "bash# mv /etc/vz/[0-9]*.conf /etc/vz/conf/" + ewarn + fi + ewarn "NOTE: Starting with vzctl-3.0.22 the mechanism for choosing the" + ewarn "interfaces to send ARP requests to has been improved (see description" + ewarn "of NEIGHBOUR_DEVS in vz.conf(5) man page). In case VE IP addresses" + ewarn "are not on the same subnet as HN IPs, it may lead to such VEs being" + ewarn "unreachable from the outside world." + ewarn + ewarn "The solution is to set up a device route(s) for the network your VEs are" + ewarn "in. For more details, see http://bugzilla.openvz.org/show_bug.cgi?id=771#c1" + ewarn + ewarn "The old vzctl behavior can be restored by setting NEIGHBOUR_DEVS to any" + ewarn 'value other than "detect" in /etc/vz/vz.conf.' +} |