OpenVZ-legacy
  1. OpenVZ-legacy

vzctl.ovzl

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
1c4b8bdfd72Released vzctl 4.6.1Changes: see https://openvz.org/Download/vzctl/4.6.1/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
cbadbccacd2vzctl start: don't fail if VE_ROOT does not existSince commit 78b5f53 we are not mounting CT if is_vps_mounted() returns error. This is not the right thing to do since we fail to start if VE_ROOT does not exist. Fix is easy -- check for "if not mounted or unknown status". https://bugzilla.openvz.org/2807 Reported-by: lopo@losys.eu Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 6e512c2f13264ea37ac6660028a2eed5c37e6...
Kir KolyshkinKir Kolyshkin
aac3b8b5ed2vzlist: fix bogus CTIDs in listAfter commit 95f0ec2 we call get_mounted_status() conditionally. If it is not called we do not remove containers with non-existing VE_PRIVATE. That results in strange effects like CTID of 0 to appear in vzlist -1a output. Rework the optimization done in 95f0ec2/r928084 to not be too agressive. https://bugzilla.openvz.org/2830 Reported-by: Tyler Bishop <tyler.bishop@beyondhosting.net> Signed-...
Kir KolyshkinKir Kolyshkin
6998acf1d1evzubc: fix to work in old mawkDebian ships mawk by default, and even in Debian Wheezy mawk version is pretty old (1.3.3 Nov 1996). This is probably the reason why it doesn't support POSIX bracket expression (a.k.a. character classes) in regular expressions. Fix is simple: replace [:space:] with an actual space and a tab. https://bugzilla.openvz.org/2793 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728071 Reported-by:...
Kir KolyshkinKir Kolyshkin
0722170924fndsend: clear reserved2 fieldhttps://bugzilla.openvz.org/2804 Reported-by: Sebastian <saltyacid@gmail.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 23856fb24fad26afdc3a0c67f397a5ebd97bf54f)
Kir KolyshkinKir Kolyshkin
6e37c79cbacfill_vswap_ub(): fix a potential segfaultCurrently this can't happen, since the presence of swappages is checked in either check_ub() (for vzctl start) or in set_check_mode() (for vzctl set). Nevertheless, if in the future someone would call fill_vswap_ub() from some random place, it should not segfault. So, check if swap is set and refuse to proceed otherwise. Note that the physpages is checked in is_vswap_config() so there's no ne...
Kir KolyshkinKir Kolyshkin
1f502d0010fvzctl set: require swap to be set for VSwapIn case we have a container with VSwap configuration either in config file or supplied via the command line, we expect swap to be set as well (again, either already in config file or via command line). Otherwise a container would not be able to start next time, due to check_ub(). So, let's just require swap to be set in this case. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked f...
Kir KolyshkinKir Kolyshkin
6172a428bd9set(): don't ignore fail from fill_vswap_ub()If fill_vswap_ub() fails, don't ignore it and return an appropriate error. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 62f1607da064345a899ecee37e6c72010b7c37f9)
Kir KolyshkinKir Kolyshkin
63109a20144Released vzctl 4.6Changes: see http://openvz.org/Download/vzctl/4.6/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c70d0f6361cget_hwid(): no need to explicitly specify lengthJust a nitpick. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
cf43c510bbcget_hwid: don't pclose(NULL)Reported by Coverity, CID 1113224. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
0da90c7a41bio.c: shorten warningsShorten "io* not supported, skipping" warning messages to fit 80 columns. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1faff937099init.d/vz*: unset io limits before stopping CTIn addition to removing cpulimit just before stopping a container, now it also makes sense to remove its io and iops limits. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8fb5d2141a0init.d/vz-redhat: don't reset cpulimits for all CTsThis is a fix to commit 8fa8a6193. The intention was to reset cpulimit just before stopping a CT. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6d4cc6a81a8vzctl set --io{,ps}limit: show 0 as unlimitedBefore this patch: # vzctl set --iolimit unlimited --iopslimit 0 Setting iolimit: 0 bytes/sec Setting iopslimit: 0 iops After: # vzctl set --iolimit 0 --iopslimit unlimited Setting iolimit: 0 (unlimited) Setting iopslimit: 0 (unlimited) Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
173555b9dd4Add iolimit and iopslimitThis patch adds iolimit and iopslimit support. This functionality is available for OpenVZ since kernel 2.6.32-042stab084.2. Work was sponsored by GleSYS Internet Services AB (http://glesys.se/) via a feature request form available at bit.ly/YtWwWN * vzctl set: add --iolimit and --iopslimit * bash_completion: add appropriate completions * vzlist: add appropriate new fields * vzctl(8): describe...
Kir KolyshkinKir Kolyshkin
c271f4be055etc/init.d/vz-gentoo: fix setting default... for NET_MODULES and PLOOP_MODULES Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4c53c4342c4vzevent-stop: check for suspend/chkpntThis script check if the stop event was caused by vzctl and exits in case it's so. Apparently, stop even can be caused not only by vzctl stop and vzctl restart, but also vzctl suspend and vzctl chkpnt, so let's check for those as well. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9764461cd70vzctl create, vzctl exec: do skip fsckfsmount() function is called from vps_postcreate() and vps_run_script(), and its last argument, fsck, is a binary flag passed on to libploop directly, with value of 0 meaning to skip fsck, any other value to run fsck. So, using SKIP_FSCK flag is a mistake here, we should just use 0. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d620eb04880vzctl console: hack to force redraw on reattachSince vzctl console is persistent, there might be a case when say vim or bash is left on the console when we exit from it. The problem is when we use vzctl console for the second time, nothing is re-drawn despite the fact that we issue TIOCSWINSZ ioctl (which leads to SIGWINCH being sent to an app running on that console). So second vzctl console shows us empty screen. It would be nice to force...
Kir KolyshkinKir Kolyshkin
88d3576750fvzoversell: addThis simple script aims in finding out whether a system is oversold in terms of RAM and swap. In other words, whether the sum of RAM+swap limits for all container exceeds available RAM and swap. Note that overselling RAM is OK since swap is used, while overselling RAM+swap is not, since this could lead to OOM killing some processes. NOTE this version is only usable for VSwap containers. For n...
Kir KolyshkinKir Kolyshkin
47ef2f6e3a1vzubc: fix showing headersSilly leftover in previous commit 2d9eeca. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6c683601ee6Fix quota on ploop for RHEL5 CTThis commit fixes two issues preventing in-container disk quota to work inside a RHEL/CentOS 5 container with ploop layout. First, ploop uses ext4 new quota format (vfsv0) which quota tools should deal with. Support for this format appeared in quota-3.16, so commit ebbf339 adds a check for it. Red Hat backported this support to their quota tools, so in RHEL5 quota-3.13-4.el5 already supports ...RHBA-2011
Kir KolyshkinKir Kolyshkin
f1b0cc65691setver.sh: introduce build idIf we build a package for the second time without doing any git commits, add a build id of .1 as a suffix to RPM release fields. Remove the suffix once git release has changed. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
36e66b8e5d5setver.sh: use getoptNow we can combine short options, such as -ab instead of -a -b Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
cc481ec49c9vzlist(8): fix indentationBeancounter and disk quota suffixes description are not related to -L option, so they should not be indented under it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1e74901c8e7vzlist(8): fix subsection referenceIt is named "Possible fields" not "Standard fields". Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e82230f13b1vzctl start: don't start CT if /proc mount failedReference: libvzctl@930750 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
2d9eecac365vzubc: don't show unlimited ubcs, add -vNow when most people use VSwap (or so I hope), there is no need to show the beancounters that are set to unlimited. With this patch, unlimited UBCs are not shown. In non-VSwap mode, all UBCs are limited so they will still be shown as before. In VSwap mode, though, the output will be smaller thus simpler to grasp. Option -v|--verbose is added to switch vzubc to the old behavior, i.e. show all...
Kir KolyshkinKir Kolyshkin
f26c0a86c07vzubc: print errors to stderrSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
21a18dcb21a[style] parse(): use code returned by parse_ioprioIt is either 0 or ERR_INVAL which suits us perfectly. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3625e7b4e2fsrc/lib/config.c: move get_mul() upTo be used by the next patches. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f1ad5712ad3[style] parse_ioprio(): rm id argumentThere is no use to have it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Igor SukhihKir KolyshkinIgor Sukhih
95f0ec210a2vzlist: skip mounted status check if not neededThis should speed up some vzlist commands, especially for NFS-based containers. Reference: vzctl@928084
Kir KolyshkinKir Kolyshkin
eb6928ee402scripts/vz-postinstall.in: fixupFix to commit 2952d04 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
93a4c272505init.d/vzeventd-redhat: switch to strict bash... and fix the following checkbashisms warnings: possible bashism in etc/init.d/vzeventd-redhat.in line 55 ($EUID should be "$(id -u)"): [ "$EUID" != "0" ] && exit 4 possible bashism in etc/init.d/vzeventd-redhat.in line 66 ($"foo" should be eval_gettext "foo"): echo -n $"Starting $prog: " possible bashism in etc/init.d/vzeventd-redhat.in line 75 ($EUID should be "$(id -u)"): [ "$EUID" != ...
Kir KolyshkinKir Kolyshkin
35be940d0e2init.d/vzeventd: set reboot_eventThe new RHEL6 kernel 042stab082.3, adds the following change: * ext4: send vzevent on error (PSBM-20496, PSBM-21010) This change makes ext4 kernel module depend on vzevent, which is loaded as a dependency. Therefore, it is loaded with defaults, including reboot_event=0, and then init.d/vzeventd warns about it: /etc/init.d/vzeventd start Checking vzevent kernel module ... ...2 Jira Issues
Kir KolyshkinKir Kolyshkin
51278b77909Revert "init.d/vzevent-redhat: support for RHEL4"There is no need to support RHEL4 kernel anymore, it was frozen in November 2012. This reverts commit 7d4c629f810fdb047298a1db442f0dff5c7adcb2. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
2952d043421vz-postinstall: don't add bridge params to sysctl.confThis enhances commit a7aaea0. Since the default for these net.bridge.bridge-nf-call-* parameters are 1, it doesn't make sense to add those, we only need to change them to 1 if they are there and set to 0 (RHEL case). This should fix the following error message for distros that do not load bridge by default: # sysctl -p error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "...
Kir KolyshkinKir Kolyshkin
d48bcf47b12Don't modify sysctl.conf on installationAs suggested in the bug report linked below, installing vzctl rpm should not modify /etc/sysctl.conf, plus there should be a way to totally prevent it. Still, it's better to disable selinux when we install, i.e. before a reboot. So, what this patch does is: 1. Splits vz-postinstall functionality into 'sysctl' and 'selinux' pieces. 2. Call vz-postinstall selinux from vzctl.rpm on a fresh insta...
Kir KolyshkinKir Kolyshkin
0b30a0e5831fill_vswap_ub(): fix a segfaultCommit 044ff4e was setting oomguar and vmguar limits even if the memory for those parameters were not allocated. Let's just have separate barrier and limit in SET macro. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
97e2693b018vzctl(8), ctid.conf(5): document vm_overcommitSame as in https://openvz.org/VSwap#Implicit_UBC_parameters Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
65a361db700vzlist: add vm_overcommit fieldSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
aaed0b01e68Don't save autocalculated secondary UBCsWhen in vswap mode we auto-calculate secondary UBCs, we should not save them. So, we need a copy of ubc_param. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
044ff4e861e[vswap] set calculated oomguar and vmguar limit to LONG_MAXWhen secondary UBC parameters are calculated in vswap mode based on ram and swap, their barrier and limit are set to the same value. In fact it's wrong, limit of oomguarpages and vmguarpages should be set to unlimited. From http://openvz.org/vmguarpages: > The meaning of the limit for the vmguarpages parameter is > unspecified in the current version and should be set to the maximal > allowed ...
Kir KolyshkinKir Kolyshkin
97940979605src/lib/config.c: use FOR_ALL_UBC macroSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
618e02889fesrc/lib/ub.c: use FOR_ALL_UBC macroSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3e6330a0e4cMove FOR_ALL_UBC macro from vzlist.c to ub.hIt can be used in other sources as well. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
63069ce081a[style] include/res.h: typo in a commentSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
242ec2a5ddcvzctl set: add --vm_overcommitAlso, add the new option to bash completion script. This is an addition to commit 89fee19. Signed-off-by: Kir Kolyshkin <kir@openvz.org>