OpenVZ-legacy
  1. OpenVZ-legacy

vzctl

Public

Commits

AuthorCommitMessageCommit DateIssues
Kir KolyshkinKir Kolyshkin
b7a86e49ba7Released vzctl-3.0.26.3This is a next stable update to 3.0.26, fixing the following regressions: (introduced in 3.0.25) * redhat-add_ip.sh: do not remove route-venet0 (#1818) * vzctl.spec: fix shell redirection in %post (introduced in 3.0.26) * Fix networking for Debian-3.1 (#1802) * vznetaddbr: fix interface initialization (#1831) In addition, it fixes the following bugs (not regressions): * init.d/vzeventd-gentoo...
Kir KolyshkinKir Kolyshkin
5784198b4a2etc/osrelease.conf: debian-6.0 needs 2.6.32Unlike Fedora, there's no code in Debian glibc that shuts it up completely if the kernel is older than expected. But Debian apt complains about older kernel sometimes. Make it happy :( Reported-by: Hristo Benev <foxb@abv.bg> Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 9f98998b381824d486e8e4f9d0f6d496e81e3d66)
Kir KolyshkinKir Kolyshkin
d9f3b6f08e0etc/dists/scripts/set_ugid_quota.sh: add LSB tags to vzquota initscriptOn Debian systems, insserv complains loudly about this crippled script: insserv: warning: script 'S06vzquota' missing LSB tags and overrides insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/S00vzreboot insserv: warning: script 'vzquota' missing LSB tags and overrides insserv: There is a loop at service vzquota if started insserv: There is a loop between service vzquota and ...
Kir KolyshkinKir Kolyshkin
dbfffdf43d1vzmigrate: make sure @SBINDIR@ is in $PATHvzmigrate scripts calls vzctl binary (locally and remotely using ssh root@host). For local calls, we rely on PATH containing the directory vzctl was installed into, which is, naturally, @SBINDIR@. Usually this is /usr/sbin or /usr/local/sbin which are in root's PATH. But in case we run sudo vzmigrate it can not be the case and lead to the following error: /usr/sbin/vzmigrate: line 312: vzctl...
PeterPeter
43b9b5e0a29init.d/vzeventd-gentoo: fix starting, handle compiled in vzevent(1) Source /etc/conf.d/vz so we know value of VIRTUOZZO and do not fail in check_config() (2) Allow it to work when modules are built in (MODULES_DISABLED=yes). Set /sys/module/vzevent/parameters/reboot_event=1 on service startup. (3) Cleanups: indentation fixes, use ${VAR} not $VAR. Fixes Gentoo bugs: http://bugs.gentoo.org/show_bug.cgi?id=361453 http://bugs.gentoo.org/show_bug.cgi?id=3...
Kir KolyshkinKir Kolyshkin
32d648a45bbvznetaddbr: fix interface initialization (again and again)This is yet another attempt to fix veth initialization after we switched from ifconfig to ip (apparently breaking the "don't touch it if it works" rule). For historical retrospective of this issue, see the following * git commits: 3c638947, 77631ba55, 93ef4d978. * bug reports: #1617, #1731, #1682, #1089. This time, the problem is some intermediate versions of 'ip' utility were broken in 2008...
Kir KolyshkinKir Kolyshkin
44f71e1f8a0vzctl.spec: fix shell redirection in %postIt was 2&>1 instead of 2>&1. Fix. Reported-by: Dmitry Kopytov <kopytov@kopytov.ru> Reported-by: Jakub Jankowski <shasta+ovz@toxcorp.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 948f41624bdc8e9bf2d73794e2a5c51f96d6c257)
Kir KolyshkinKir Kolyshkin
262a5dd8a26Fix networking for Debian-3.1After a few changes in dists/scripts (specifically, 9612a012) we broke the compatibility with Debian 3.1. My guess was nobody will notice since people have moved on to newer versions, but apparently I was wrong. Let's fix it in a very simple way -- use older version of add_ip script for Debian-3.x, generated with git show 25c14e96:debian-add_ip.sh Note that del_ip script is about the same ...
Kir KolyshkinKir Kolyshkin
fcc6c253913redhat-add_ip.sh: do not remove route-venet0Commit 25c14e96 removed old FAKEGATEWAY handling. Apparently it did way too much and removed route-venet0 completely. People use it for specifying in-VE static routes, so we should not remove it. http://bugzilla.openvz.org/1818 Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 5eced4a8a0ae53ac0901663446a715bcfe8a8d9b)
Kir KolyshkinKir Kolyshkin
803f5f2371dReleased vzctl-3.0.26.2This is a next stable update to 3.0.26, fixing the following regressions: * 'test: integer expression expected' error from vz initscript (#1806) * vzctl runscript: fix logic in case container is stopped In addition, it fixes the following bug (not a regression): * vzctl exec: fix for bash-4.2 (#1812) Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b62836c4a16vzctl exec: fix for bash-4.2Just before exec'ing bash we need to close all fds except for stdin/out/err. Earlier versions of bash did that for us so the bug went unnoticed. http://bugzilla.openvz.org/1812 Reported-by: michaelk@linuxmail.org Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit e7c40ee697606e43d6242fd3c124e370588ae26f)
Kir KolyshkinKir Kolyshkin
72b0c8b051dvps_run_script(): do not leak opened fdsClose all opened fds, keep your country tidy. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 20256d0c0c07278bd5ed5c7f954046a63db1f37f)
Kir KolyshkinKir Kolyshkin
2f2649179c6vzctl runscript: fix logicCommit fd657abf12 changed the logic of handling wait_p file descriptor, but vps_run_script() was not changed to reflect the logic. So, now when a container is not running and we execute vzctl runscript, it ends up being half-started. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 49bff887b543adf0dd349ccbd3756efbe4663497)
Kir KolyshkinKir Kolyshkin
99d856b372dvps_run_script(): fix arguments for vz_env_create()Commit c4fd52f7 added an extra argument to vz_env_create(), but incorrectly patched vps_run_script(). Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 8f5e6fa0bce93b6ef19af4fe828799eb3ca2b37c)
Kir KolyshkinKir Kolyshkin
49679d1ce1fetc/init.d/vz*: more proper kernel check in modify_vzconf()For now, the only VSwap-capable kernel is 042{test,stab}. Currently all the kernels that do not have stab or test in their name (ie in /proc/vz/version) are definitely not VSwap-capable. If they ever will be we will need to modify this check. Add the check for 'test|stab' to avoid the following error while starting vz initscript: /etc/init.d/vz: line 163: test: dzhanibekov: integer expressi...
Kir KolyshkinKir Kolyshkin
15ef5b58b80Released vzctl-3.0.26.1This is a stable update to 3.0.26, fixing the following regression: * debian ip add script broken - network unavilable (#1792, #1669) Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Thorsten SchifferdeckerThorsten Schifferdecker
a5a02c492e6etc/dists/scripts/debian-add_ip.sh: fix not adding default routeThis fixes the problem of non-working network in Debian and Ubuntu containers after upgrade to vzctl-3.0.26, caused by commit 9612a0121. Apparently, older kernels (like 2.6.18) are refusing to add default route for a device with no IP addresses. Such problem does not exist with RHEL6 based (2.6.32) kernel, but RHEL5-based kernels (2.6.18) are failing miserably. The workaround is to use 'ifcon...
Kir KolyshkinKir Kolyshkin
6589c172ce2Released vzctl 3.0.26CHANGES (since 3.0.25.2) New features * vzctl set: add cpu bindings (--cpumask) * etc/conf: add vswap configs * etc/init.d/vz*: switch default CT config to vswap if supported * vzctl set --pci*: use newer kernel API * etc/vz.conf: enable IPv6 by default (#651) Fixes * vzctl start: do not start half-configured environment (#1732) * vzctl restore: support both old and new kernel lockfd api (#17...
Kir KolyshkinKir Kolyshkin
b888c479e6avzctl create: warn if default sample is not to be usedIn case CT config already exists, a default configuration sample (the one specified as CONFIGFILE in vz.conf) is not being used. This is aimed at advanced user who knows what to do. Still, some people mistakenly set a few CT parameters before vzctl create, and it ends up with incomplete config (and inability to start). For those, emit the following helpful warning: Warning: CT config file a...
Kir KolyshkinKir Kolyshkin
4c3c8a8883bvzctl create: exit with error if default CT config not foundIt was discovered that vzctl create tolerates invalid setting of CONFIGFILE in /etc/vz/vz.conf and just silently creates a container with unusable configuration file. Fix it by explicitly checking that config sample exists, and error out if it's not, giving a user a helpful hint of what's wrong, like this: # vzctl create 21342134 File /etc/vz/conf/ve-something.conf-sample not found: No such...
Kir KolyshkinKir Kolyshkin
c5995be1c2fetc/init.d/vz-*: fix for previous kludge.Commit 39bdf8e401 added a kludge to modify default CONFIGFILE for vswap-enabled kernel (and warn a user about it). The problem is such warning is printed every time (on a vswap-enabled kernel) regardless of whether we actually modify vz.conf or not. Fix it. While at it, make the code more simple/generic. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Andrey VaginAndrey Vagin
018a584c73dvzctl restore: CPT_UNDUMP may return positive valueWhen vzctl writes something to CPT_LOCKFD, the kernel reads data from this file descriptor and should return an error (negative value), but instead it returns code from read() (naturally, positive value). This kernel bug exists in old kernels (every one except rhel6 < 042test008). Indeed, this is the bug in the kernel, so this patch is a workaround for it. Instead of checking for negative val...
Andrey VaginAndrey Vagin
c4fd52f7301vzctl restore: support old and new interface of cpt lockfilesThe small historical reference about new semantic of wait_p: commit fd657abf122caee09189b115f116c9d089695991 Author: Kir Kolyshkin <kir@openvz.org> Date: Wed Jan 12 16:14:58 2011 +0300 That "OK to go" signal is closing a specific file descriptor without sending anything via it, while "no go" signal is sending some error code. The problem is in case the parent segfaults, the kern...
Kir KolyshkinKir Kolyshkin
4c6da8fd2d0etc/dists/scripts/debian-add_ip.sh: remove venet0 completely if no IPs to addWhen IPDELALL is set and IP_ADDR is empty, remove venet0 completely from /etc/network/interfaces, so there will be no default route etc. If IP_ADDR is not empty, only remove IP addresses and leave the main venet0 section intact. Should fix bug #1669. http://bugzilla.openvz.org/1669 Reported-by: Olena Vasilkova <daemon@root.ua> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9919b2132ebetc/dists/scripts/debian-add_ip.sh: improve removing of IPv6 addressCommit 9612a0121 changed the logic of adding an IPv6 address to Debian CT. This patch adds some enhancements to it: - adding a comment telling what we do - make the grep regex stricter: we want the line to start with a tab and a space after add/del - also remove "down ifconfig venet0 del" line which was not removed http://bugzilla.openvz.org/1669 Cc: Michael Fincham <michael@unleash.co....
Kir KolyshkinKir Kolyshkin
28d4a5417cbetc/dists/scripts/debian-add_ip.sh: remove all traces of venet0When starting a container with no IP addresses configured, make sure to remove everything about venet0 from /etc/network/interfaces. Before this patch, we only checked if there are aliases (like venet0:1), but not for venet0 itself. Now we check both for venet0 and its aliases. This is part of the fix for bug #1596. http://bugzilla.openvz.org/1596 Reported-by: Olena Vasilkova <daemon@root.u...
Kir KolyshkinKir Kolyshkin
28a50ed2845etc/dists/scripts/debian-*_ip.sh: remove hardcoded namesSpotted a few places where hardcoded names are used instead of variables. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1a89e73a4e9src/lib/config.c: declare some functions as staticAlso, remove one unused function. It was meant to implement the 'vzctl unset' functionality, but we will do it in a different way. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
09dc74974bbsrc/lib/veth.c: declare a few functions as staticPure cleanup, should have no visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
a278e5b20bbveth: added hint to load vzethdevIn case vzctl fails to configure veth device because kernel returns ENOTTY from VETHCTL_VE_HWADDR ioctl(), this means kernel doesn't know anything about veth. Most common reason (for recent kernel) is that kernel module is not loaded -- give a user a hint about it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8d04105f49evzctl chkpnt: fix a code pathCommit 16ee8dd9 forgot to add curly braces for an if statement. Cc: Andrey Vagin <agavin@openvz.org Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3c638947fb0vznetaddbr: fix interface initializationInitially, we used "ifconfig $if 0" to initialize veth interface. Commit 93ef4d978 changed that to using "ip a a 0 dev $ifname" which looks like full analog of previous ifconfig, but lead to bug #1089 reported. Next, commit 77631ba55 (ironically with the same same subject as this one) changed "ip a a 0 dev $if" to "ip link set dev $if up". This probably fixed bug #1089, but lead to opening a ...
Kir KolyshkinKir Kolyshkin
383e2756bc4vzmemcheck: fix output formattingIn case -vA options are used, last line was printed with a skew: ------------------------------------------------------------------------- Summary: 16.49 169.15 107.53 107.53 907.15 256.47 1117.15 2491.70 1201.00 1201.00 3004.00 3977.00 3977.00 3977.00 3977.00 3977.00 Fix it, and also add one missing dash. After this patch, it looks like it should: ---------------------------...
Kir KolyshkinKir Kolyshkin
2ffb55af838vzmemcheck: fix headerApparently we forgot to change veid to ctid. Make it uppercase while at it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d94974e1f9bcalc_hn_rusage(): only account for running containers.While it is usually not the case, sometimes /proc/user_beancounters contains values from the old (not currently running) containers. There are a few reasons why it can be the case, with the most common being a kernel bug. Nevertheless, calc_hn_rusage() should not use beancounters for not running CTs. We do so by getting a list of running CTs first, and then for every UBC check that such UBC ID...
Kir KolyshkinKir Kolyshkin
0517647e2e9vzmemcheck: only account for running containers.While it is usually not the case, sometimes /proc/user_beancounters contains values from the old (not currently running) containers. There are a few reasons why it can be the case, with the most common being a kernel bug. Nevertheless, vzmemcheck should not use beancounters for not running CTs. We do so by getting a list of running CTs first, and then for every UBC check that such UBC ID exist...
Kir KolyshkinKir Kolyshkin
24cc0e56070util.c: introduce get_running_ve_list(), ve_in_list() functionsThose are to be used to fix bug #1757. http://bugzilla.openvz.org/1757 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f15ef532367src/validate.c: declare a few functions as staticShould have no visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c8b77d2a032build system: fix make distCommit 3866be1b709 broke 'make dist' target -- etc/conf/*.conf files were not included into tarball. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
PeterPeter
6a30007ef25vzifup-post: fix device for proxy arpWe need to del/add routing to detect correct device for proxy arp in NEIGHBOUR_DEVS=detect mode. http://bugzilla.openvz.org/show_bug.cgi?id=1587
Kir KolyshkinKir Kolyshkin
981789cd47csrc/validate.c: fix error messageSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
302faf2cd21build system: fix generated files' permsIt is more convenient for developers if all the generated files have the same permissions as their .in ancestors. It's a not a big deal per se because 'make install' takes care about proper permissions. Use chmod --reference to do that, and ignore the error if it doesn't work (for example when 'chmod' don't understand '--reference' option). Reported-by: Andrey Vagin <avagin@openvz.org> Signed...
Kir KolyshkinKir Kolyshkin
117ea7223ffetc/vz.conf: enable IPv6 by defaultThere is no reason to keep it disabled by default. http://bugzilla.openvz.org/651 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e6057c5d68fsrc/lib/cpt.c: fix a function nameThere was a typo in function name. Fix it, just for the sake of aesthetics. While at it, change FN to lowercase. Should not have any visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f812857d33bman/vzlist.8: improve the description of -S optionOption -S, --stopped actually means 'non-running', so let's make it clear in the man page. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0d603ccc1b8bash-completion: for restore, show only suspended CTsWhen completing CT IDs and names for vzctl restore, only show CTs what have a status of suspended. Unfortunately vzlist doesn't have the ability to filter out CTs by status (except for running/stopped/all), so we have to use grep/sed trickery. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0f7cb303a8abash_completion: chkpnt running CTs onlyWhen completing CT IDs and names for vzctl chkpnt, offer only running CTs. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6d1ee00a367src/vzlist.c: remove dead codeAfter commit 69417764 we have the following warnings: CC vzlist.o vzlist.c:825:14: warning: ‘parse_var’ defined but not used vzlist.c:1075:14: warning: ‘remove_sp’ defined but not used vzlist.c:1357:12: warning: ‘get_stop_quota_stats’ defined but not used Remove these functions as they are unused. A note about get_stop_quota_stats(). For stopped containers, soft/hard quota limits are s...
Kir KolyshkinKir Kolyshkin
78f127bb7favzlist: fix sorting for some fieldsApparently, column sorting order was wrong for some columns, namely dcachesize.{m,b,l,f} and diskinodes.{s,h}. Fix it. Interestingly, the bug was discovered because of the previous commit, 69417764, after which compliler complains: CC vzlist.o vzlist.c:400:1: warning: ‘dcachesize_m_sort_fn’ defined but not used vzlist.c:400:1: warning: ‘dcachesize_l_sort_fn’ defined but not used vzlist....
Kir KolyshkinKir Kolyshkin
694177643e3src/vzlist.c: declare most functions as staticThose functions (and a structure) are not used anywhere outside of vzlist.c so declare them as static. Signed-off-by: Kir Kolyshkin <kir@openvz.org>