OpenVZ-legacy
  1. OpenVZ-legacy

vzctl.ovzl

Public
AuthorCommitMessageCommit dateIssues
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>
Kir KolyshkinKir Kolyshkin
bd7f7707e78vswap: set secondary UBCs if unsetApparently, if some UBC parameters are not set in VSwap mode, it makes sense to set those implicitly, based on 'ram' and 'swap'. lockedpages = ram oomguarpages = ram vmguarpages = ram + swap Also, if vm_overcommit is set: privvmpages = (ram + swap) * vm_overcommit Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
89fee19a29bImplement VM_OVERCOMMITThis patch adds VM_OVERCOMMIT configuration parameter and --vm_overcommit option for vzctl set. To be used by the next commit. To be documented. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
f781679277fvzctl set --reset_ub: only allow for running CTOn a non-running container, --reset_ub doesn't make sense, so print an error and return proper exit code. Before this patch, this was silently ignored. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c6cff6baf08merge_ub(): move from ub.c to config.cNo functional change Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3a10b7b5589config.c: more const to char *In find_conf_line(), check_name() arguments. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
03dbc40ac5aconfig.c: Add const to char * in a few placesSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e8d9f55e38eparse(): add missing break statementThere was no bug since the next case statement consists of just break, nevertheless let's add an explicit break. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
bb1956e97afset_ublimit(): don't set unknown UBs to unlimThis basically reverts commit bfabefd. Apparently it was needed for some very old 042* kernel, and was not taking into account the fact that set_ublimit() is also called from the vzctl set command line for a running container, when not all UBC parameters are specified. This fixes the following bug: when vzctl set --physpages is called for a running container, it sets all the beancounters that ...