Released vzctl-3.0.29.2 CHANGES
(since 3.0.29.1)
Regressions:
* Fix broken venet networking (#2001)
Bug fixes:
* vzctl set --ipadd/--ipdel: a few fixes for IPv6 address case
* vzsplit: fix kmemsize for vswap mode (#1994)
* vzsplit: set swappages.barrier to 0 in vswap mode
* vzsplit: set dcachesize to half of kmemsize (#1949)
* vzlist: fix segfault when sorting by loadavg (#1978)
* vzctl set --quotaugidlimit: try h...
etc/dists/scripts/set_ugid_quota.sh: try to fix /etc/mtab harderIn case vzctl-3.0.28 or 3.0.28.1 (i.e. the one with commit e324b0ade8
but without commit bfe59a28b) was used on a container with quotaugidlimit,
the CT might end up with an incorrect /etc/mtab file having simfs in fs field.
The fix introduced later is correct, but it's not checking for the broken
case like the one above. This case is fixed by this patch, which just blindly
symlinks /etc/mtab -...
vzctl set --ipadd: fix setting IP address with a netmaskWhen netmasks were added to vzctl (as per bug #1088) this place
was forgotten. Unfortunately due to 'return 0' statement in case of error
from get_netaddr() this error went unnoticed.
Fix the case (by removing /mask from IP address string).
Fixes http://bugzilla.openvz.org/2001
http://bugzilla.openvz.org/1088
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit e8122a19c7...
etc/dists/scripts/debian-add_ip.sh: a fix for IPv6 caseIn case of IPv6 address $_NETMASK can be empty, so we need to quote
arguments, otherwise their positions will be shifted and we will end
up having value of $IFNUM as $_MASK and empty $IFNUM. Bad bad bad.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit 874cd35210b002b9a31fd633cb520d9007bcde95)
etc/dists/scripts/functions: fix a bad typoIt is supposed to be _IPV6ADDR, neither _IPV6_ADDR nor IPV6_ADDR.
Shame shame shame shame.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit c812be79263e825404784d298b0ed72b5a5d95b1)
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzsplit: set DCACHESIZE to half of KMEMSIZEAccording to http://bugzilla.openvz.org/1949
and http://wiki.openvz.org/VSwap
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit cbe70b02767acb3cc0ef20b9b7e6398cf7114de2)
vzsplit: refactor kmemsize calculation in vswap modeShould have no visible effect.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit 2bd8b73e660caf4c850ff8fa52748f8f96f11878)
vzsplit: set swappages.barrier to 0 in vswap modeCurrently, kernel only uses swappages.limit, while swappages.barrier
is not used and should be set to 0 (just in case).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit c063dd6d3ccbc668c12db30790347ba323216439)
vzsplit: fix kmemsize in vswap modeAll other params are in pages, while kmemsize is in bytes. Oops.
http://bugzilla.openvz.org/1994
Reported-by: Eric <openvz@hostultra.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit 876c132c51c29bc17f5a63f1030c15f869834382)
vzlist: fix segfault when sorting by loadavgApparently the sorting (1) didn't work and (2) segfaulted in case some CTs didn't have
load average values (which is pretty easy to have if you list stopped CTs).
BTW this is a zero day bug (it comes from the initial vzctl commit to git), so it took
about 6 years to discover it. My congratulations to Alexander!
Reported-by: Shvayakov Alexander <a.shvayakov@gmail.com>
Signed-off-by: Kir Kolysh...
vzlist: show swappagesvzlist was using /proc/user_beancounters interface to read BC values.
swappages is not there, so we need to switch to new (/proc/bc/resources)
file, with an old one as a failover.
http://bugzilla.openvz.org/1984
Reported-by: Slava Dubrovskiy <dubrsl@altlinux.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit 8b490bfeac05b03510d899667356331265af26c4)
etc/conf/ve-vswap-*sample: set dcachesize to half of kmemsizeOtherwise all the kernel memory could be eaten up by dcache,
as shown in bug #1949.
http://bugzilla.openvz.org/1949
Reported-by: Thomas Menari <tom@coreware.co.uk>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit a3a907b0576548b5da27f43c73641ea7f7673827)
etc/init.d/vz-redhat: fix modules loading wrt dashApparently different shells have different quoting rules.
Quote $1 in load_modules() to be on the safe side.
http://bugzilla.openvz.org/1936
http://bugs.debian.org/635730
Reported-by: Jean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>
Reported-by: Ola Lundqvist <ola@inguza.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit 70ec772c5d407d867d45c73be56ea5454bcd...
etc/init.d/vzeventd-gentoo.in: fix service stopvzeventd does not create pid file. Drop its mentioning from init script
to fix /etc/init.d/vzeventd stop.
http://bugzilla.openvz.org/1980
https://bugs.gentoo.org/show_bug.cgi?id=382213
(cherry picked from commit 310770db7ee0f69478f9cc6b8ef4901276df3aa5)
etc/dists/scripts/set_dns.sh: fixCommit 7ff74dc4c is not that bad except for the fact that grep, unlike sed,
exits with code 1 if the pattern is not found. This makes the script error
out, which is very unfortunate.
Go back to using sed. Note this is not a complete patch revert -- we still
achieve what we wanted in commit 7ff74dc4c.
Fixes http://bugzilla.openvz.org/1991
Reported-by: Scott Dowdle <dowdle@montanalinux.org>
Si...
Fix networking for Ubuntu-6.06This is an addition to commit e08d12dce.
http://bugzilla.openvz.org/1802
Reported-by: Harald Kapper <hk@kapper.net>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
(cherry picked from commit 9142950653ef476f2e56dd75ddd17d82783fa180)
Released vzctl-3.0.29CHANGES
(since 3.0.28.3)
New features
* vzctl set --ipadd: support for net masks (#1088)
* vzsplit: support for VSwap enabled config generation
Fixes
* vzctl set --ipadd: fix default route disappearing in Debian-based
containers after adding netmask (#1971)
* configs: fix VSwap configurations
* vzctl set/start: fix parsing T suffix on 32-bit boxes
* vzctl set --d...
vzlist: fix .index for uptime and ioprioSet .index for "uptime" and "iolimit" fields to 0. It's unused by the
corresponding formatters for the current vzlist output, but it will be
used by a later patches.
Reported-by: Roman Kagan <rkagan@parallels.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Fix default route disappearing in Debian-based containersLet's take a Debian 6 CT with a network setup similar to this:
cat /etc/network/interfaces
# Auto generated lo interface
auto lo
iface lo inet loopback
# Auto generated venet0 interface
auto venet0
iface venet0 inet manual
up ifconfig venet0 up
up ifconfig venet0 0
up route add default dev venet0
down route del default dev venet0
down ifconfig venet0 down
iface venet0 inet6...
bin/vzubc: fix -i/-r modes for 0th beancounterProblem:
# ./vzubc -i -c -r -q 0
Error: can not use relative/incremental modes: BCID is unknown
Cause: commit 50c173f4871e
Solution: fix check for bcid to be less than zero, initialize bcid
to -1 at BEGIN.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
bin/vzubc: fix for Debian/mawkDebian systems use mawk not gawk by default. Apparently, mawk lacks
strtonum() function. We could just truncate the last character (which is ':'),
but let's be lazy and use int() function which appears to be portable.
Reported-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
scripts/vps-*: support for IPs with netmasksNow when vzctl supports venet IPs with netmasks (commit f018af5fa
and others), we need to strip those masks from IP_ADDR list
before dealing with it.
http://bugzilla.openvz.org/1088
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
scripts/vps-net_add.in: fix VE_STATE descriptionWhen running this script, VE_STATE can either be 'starting' or
'running'. State 'stopping' only makes sense for vps-net_del script.
Fix a minor whitespace issue while at it.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl set --ipadd: fix for adding existing IP with different netmaskIf we are adding an IP, and the same IP is already in config (possibly
with different netmask), add the IP from config to 'del' list (as
if a user specified --ipdel). It will cause the from-config IP to be deleted
and the from-command-line IP to be added. This makes most sense if netmask
has changed, but even if it is the same, that kinda means "re-add this IP".
This patch relies on previous c...
vzctl set: fix exit code in case of invalid veth paramsReturn code from check_veth_param() is used as vzctl exit code:
main()
run_action()
set()
check_veth_param()
So do return VZ_INVALID_PARAMETER_SYNTAX instead of -1.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
src/lib/env.c: fix logging features maskWhen trying to compile vzctl with clang 2.8, got this:
CC env.lo
env.c:344:38: warning: length modifier 'L' results in undefined behavior or no
effect with 'x' conversion specifier [-Wformat]
logger(3, 0, "Set features mask %016Lx/%016Lx",
~~~~^~
env.c:344:45: warning: length modifier 'L' results in undefined behavior or no
ef...
__merge_str_list(): 'add' list have a precedence over 'del'Consider the following command:
vzctl set --ipdel 1.2.3.4 --ipadd 1.2.3.4
Before this patch, this does nothing. Now, we are adding values from
the 'add' list even if they are in the 'del' list, thus forcing the
command to remove the IP and add it again. This totally makes sense,
provided we remove IPs first and then add those (need to check it).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
etc/init.d/vz*: mount cgroupsNewer RHEL6-based kernels provides some information in
/proc/vz/beancounter
/proc/vz/container
/proc/vz/fairsched
but it needs to be mounted. Make sure init script takes care about this.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Add SETFCAP to default capabilities in CTIn Fedora 15 some applications use file capabilities instead of suid bit,
so file capabilities should be supported in CT.
I checked this patch works with rhel5 kernel, because nobody worries
about absent capability with number 31.
http://bugzilla.openvz.org/1911
Signed-off-by: Andrey Vagin <avagin@openvz.org>
etc/dists/scripts/{set_*,postcreate}.sh: de-bash-ifyThere is nothing bash-specific in these scripts, so make them executed
by /bin/sh.
Well, the true story is these scripts are read by vzctl and executed by
running /bin/bash and then /bin/sh inside a container, when writing the
'functions' file and then the script contents to shell's stdin. So,
these '#!/bin/whatever' does not really matter, and if bash is available
it will be used since it is ...
etc/dists/scripts/postcreate.sh: randomize /etc/cron.d entries, tooApparently modern cron daemons are not limited by /etc/crontab, there
can also be some stuff at /etc/cron.d which we should also randomize.
[kir@openvz.org: fix 'return 0' on no file found]
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636463
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
etc/dists/scripts/deb*: de-bash-ifyMost of this is written in pure shell, so let's make it runnable
by dash and busybox sh.
Slightly checked on Debian 6 with dash using set --ipadd/--ipdel commands.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
etc/dists/scripts/functions: remove bashismsInterestingly, all this stuff is pure shell, except for
'function' keyword before function declarations. So let it
be pure /bin/sh. Slightly tested with dash and busybox sh.
While at it, also remove an unneeded semicolon.
Reported-by: Sam Trenholme <strenholme.usenet@gmail.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzifup-post: do not fail if there's no /proc/vz/veipIn some situations (some of OpenVZ modules are loaded, some are not)
we can have this:
# vzifup-post eth0
awk: cmd. line:1: fatal: cannot open file `/proc/vz/veip' for reading (No such file or directory)
Fix it by changing a check for /proc/vz/veinfo to /proc/vz/veip.
Naturally, we don't care about veinfo, and we should not do anything
if veip is not here.
http://bugzilla.openvz.org/1918...
src/lib/config.c: move devperm2str() to after parse_dev_perm()Pure cosmetic change: two functions have similar meaning
and so should be close to each other in the source file.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
man/vzctl.8: use simfs in mount script exampleApparently bind mounts are not safe wrt checkpointing,
i.e. if a filesystem being bind-mounted is not recognized
by kernel checkpointing code (say, xfs is not in the list),
then checkpointing will fail.
To avoid this problem, use simfs instead of bind mount.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
etc/dists/scripts/functions: fix a typoThe typo was introduced by commit 30d0cf8d.
http://bugzilla.openvz.org/1088
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl set --devices|--devnodes: do not allow to enable loop devices in CTError out when trying to assign /dev/loop* into a CT. OpenVZ kernels
do not support loop devices inside a CT.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl set --devices: option argument parsing fixesHere is one important fix, plus a number of improvements
for parse_devices_arg().
(1) FIX parsing "permissions" (i.e. the last) parameter.
Before this patch, documented value 'none' was not
really recognized properly because string size was 3
(i.e. for up to 2 characters and a '\0' byte).
Now, use size of 6 (up to 5 characters and a '\0' byte)
to allow for values like 'none...
parse_devices_str(): fix returning error codes(1) Fix returning an error if parse_dev_perm() failed
(2) Change 1 to -1 (pure cosmetic)
(3) No need for 'int ret', remove it
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
setver.sh: fix spec releaseApparently, according to RPM, version 3.0.28.3-1 > 3.0.28.3-git*.
It makes it impossible to upgrade from stable to nightly.
Fix it by having a number of commits since the last tag as a first
part of the release. In other words
WAS: 3.0.28.3-git.57.30d0cf8
NOW: 3.0.28.3-57.git.30d0cf8
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl set --ipadd: treat IPs with different masks as the same oneIntroduce merge_ip_list() which is the same as merge_str_list(),
only using find_ip() instead of find_str() for checking IP addresses.
Since find_ip tries not to look at netmask (commit 0f8c65271), we
will not have same IPs with different masks in the resulting list.
Also, due to commit e3d0346df new values have precedence over the
old ones, so --ipadd can be used to change the mask of the alr...
src/lib/list.c: __merge_str_list(): re-prioritize listBefore this commit, values were added from the 'old' list, then from
the 'add' list (provided they were not already added before).
Now, values from the 'add' list takes precedence over the values
from the 'old' list. In other words, values from the 'old' list
are not added if the same values are to be added from the 'add' list.
Should not have any visible effect per se, other than putting the...
src/lib/list.c: merge_str_list() generalizationMake generalized __merge_str_list() with an additional find_fn argument.
This enables using function other than find_str() to check if the value
is already in the list.
Make merge_str_list() calling __merge_str_list with find_str as a last
argument.
Should not have any visible effect per se.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Rework find_ip() to work with netmasksWe want the same IP with different (optional) netmask to be found,
i.e. we want to treat addresses 1.2.3.4, 1.2.3.4/16 and 1.2.3.4/32
as the same one.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>