OpenVZ-legacy
  1. OpenVZ-legacy

vzctl.ovzl

Public
AuthorCommitMessageCommit dateIssues
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 SchifferdeckerKir KolyshkinThorsten 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 VaginKir KolyshkinAndrey 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 VaginKir KolyshkinAndrey 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>
PeterKir KolyshkinPeter
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>
Michael FinchamKir KolyshkinMichael Fincham
9612a012177debian-{add,del}_ip.sh: fix IPv6 wrt 2.6.32 kernelWhen vzctl attempts to add an IPv6 address to a Debian Lenny container on 2.6.32 no error is returned but the IP address is not added to the container. vz-1:~# vzctl set 228 --ipadd 2001:0DB8::1 Adding IP address(es): 2001:db8::1 WARNING: Settings were not saved and will be resetted to original values on next start (use --save flag) vz-1:~# vzctl enter 228 entered into VE 228 228:/# ifconfig l...
Andrey VaginKir KolyshkinAndrey Vagin
3dd594bffbavzctl: use newer API for pci_add (v2)New kernels (since 2.6.32-042test005.1) contains virtualization for generic linux devices. Now you can move any device and kernel will create sysfs tree, send uevent and give permission for char/block devices. Old scheme was not good enough, so we removed it from kernel while (hoping that) nobody's using it. Additions by kir@openvz.org: - remove nvidia module loading; - remove structs and def...
Kir KolyshkinKir Kolyshkin
04326768b01etc/conf/*conf-sample: fix a typoJust 's/sheduler/scheduler/'. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c84aa89f010etc/conf/ve-vswap*: fix DISKINODESApparently vzctl does not understand suffixes for DISKINODES, so sed 's/200K/200000/'. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
39bdf8e4012etc/init.d/vz*: add kludge to modify default CT configOn a vswap-enabled kernel, it makes great sense to use vswap-enabled CT configuration by default. For the sake of better solution, let's check in vz initscript whether we run vswap-enabled kernel and if yes, modify the value of CONFIGFILE= parameter in /etc/vz/vz.conf to be 'vswap-256m' instead of 'basic'. If CONFIGFILE is modified, do nothing. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b1b77d8579aetc/conf: add vswap configsSo, in VSwap mode we only set RAM (physpages) and swap (swappages), while all the other values are set to 'unlimited'. Remember this is still experimental stuff, and it's only for RHEL6-based (i.e 042test* and 042stab*) kernels. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3866be1b709etc/conf/*conf-sample*: remove arch-specific entriesSince vzctl-3.0.24 we can specify 'unlimited' instead of numeric LONG_MAX value in configuration files. That means that we can remove arch-specific config files and just use common configuration samples for all arches. If values were different in same config for different arches, I used the maximal values. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Vladimir DavydovKir KolyshkinVladimir Davydov
023c90e5f79cpumask: add missing files.This is an addition to commit 9038767a2. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4a9cf54c2ebvps-functions: make sure PATH contains dirs we need'arpsend' is installed into our @SBINDIR@ (which can be /usr/sbin or /usr/local/sbin or something else). 'ip' usually lives in /sbin or in some cases /bin. Previously (in vzctl <= 3.0.24) we called in /sbin/ip, but commit 8894720 changes that. So, make sure all these dirs are in PATH, so we don't fail miserably, for example like this: $ sudo /usr/sbin/vzifup-post eth1 /usr/lib64/vzctl/scr...
Vladimir DavydovKir KolyshkinVladimir Davydov
9038767a2baAdd cpu bindings (cpumask option)
Kir KolyshkinKir Kolyshkin
b041a175ed4man/vzctl.8: formatting fixFix indentation in PCI device management section. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e816ee05792vzctl.spec: add /etc/sysconfig/vzeventd as %ghostTeach RPM that if this file exists then it's ours. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d7ac02f5841vzeventd: fix child handler to avoid zombiesSometimes a signal is not delivered (and child_handler() is not called) for every single child exited or terminated, which causes zombies to appear. Use waitpid() and loop until all the children are properly reaped. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
11ff8a43cb1src/vzevent.c: fix logging of child killedCheck for WIFSIGNALED was done under WIFEXITED which is just plain wrong, therefore we never got "Child killed" message. Fix it. While at it, change the message from 'was terminated' to just 'killed'. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8afe85a38f4src/vzevent.d: simpler child handlerUse old-style singal handler function, we don't really need any of the fields provided by struct siginfo_t, and pid is returned by wait(). Pure simplification, should not have any visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org>