OpenVZ-legacy
  1. OpenVZ-legacy

vzctl

Public

Commits

AuthorCommitMessageCommit DateIssues
Kir KolyshkinKir Kolyshkin
10414548a5eReleased vzctl 4.10Changes: see https://openvz.org/Download/vzctl/4.10/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
aa080b62978postcreate.sh: xattr support for Deb8+/Ubu15+Newer distros tend to switch from using suid bit to extended attributes. Apparently, Debian 8 and Ubuntu 15.04 (and later versions) follow the herd. Fix postcreate.sh accordingly. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kirill KolyshkinKirill Kolyshkin
57a2a458de1MMerge pull request #5 from mrqwer88/OVZ-5805Add pigz support to vzctl createOVZ-5805
Sergei A MamonovSergei A Mamonov
9a9539792d9Add pigz support to vzctl createIt can speedup unpack template about 2 and more times. As example runnig vzctl create with custom 702M size template: (second and third run vzctl create with this template, file cache already warmed) - without pigz 702MB 0:00:14 [49.4MB/s] - with pigz 702MB 0:00:07 [90.9MB/s]
Kir KolyshkinKir Kolyshkin
2d41e332061Minor nitpicks for previous commits.Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6a91584a6dfprint_json_cap: fix for "off" capsIf a capability is set to off, op is set to 2, but "true" is printed because of the incorrect comparison. So, for every capability that was set to either "on" or "off", "true" was always printed. Fix for commit bac2426. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kirill KolyshkinKirill Kolyshkin
6ee1e9ed154MMerge pull request #3 from mrqwer88/OVZ-6451Ovz 6451OVZ-6451
Sergei A MamonovSergei A Mamonov
bac2426b84cAdd capability to vzlist output
Sergei A MamonovSergei A Mamonov
9b5ca91ce6badd netfilter to vzlist output
Kirill KolyshkinKirill Kolyshkin
89a00ab393bMMerge pull request #4 from mrqwer88/fix_build_cap_strFix skip first delimiter in build_cap_str
Sergei A MamonovSergei A Mamonov
f61b187d8dffix skip first delimiter in build_cap_str
Kir KolyshkinKir Kolyshkin
3f386e2322dvzubc: allow for more than 999%Sometimes vzubc shows more than 999% (say, for oomguar held to barrier percentage) and it breaks the vertical alignment: # ./vzubc ---------------------------------------------------------------- CT 902 | HELD Bar% Lim%| MAXH Bar% Lim%| BAR | LIM | FAIL -------------+---------------+---------------+-----+-----+------ kmemsize|6.38M 33% 31%|19.3M 100% 94%|19.3M|20.6M| 645K loc...
Kir KolyshkinKir Kolyshkin
cff50b9dba0pathsubst.am: hide error from chmodThis is an addition to commit 302faf2. As noted there, chmod can fail, and its not an issue if it does. So, let's hide the error, such as this one from busybox's chmod: > chmod: unrecognized option: reference=vps-functions.in Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6c2010a0044Fix incorrect includesWhen compiling on Apline Linux 3.3.1, it complains: > In file included from enter.c:30:0: > /usr/include/wait.h:1:2: warning: #warning redirecting incorrect #include <wait.h> to <sys/wait.h> [-Wcpp] > #warning redirecting incorrect #include <wait.h> to <sys/wait.h> Indeed, it should be <sys/wait.h>. Same for <sys/poll.h> in vznnc.c -- it should be <poll.h>. Signed-off-by: Kir Kolyshkin <kir...
Kir KolyshkinKir Kolyshkin
8ff9f063608Fix compile on Alpine LinuxWhen compiling vzctl on Alpine Linux 3.3.1, there is a number of errors like these: hooks_vz.c:513:11: error: 'PATH_MAX' undeclared (first use in this function) hooks_vz.c:600:11: error: 'PIPE_BUF' undeclared (first use in this function) Fix by adding #include <limits.h> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
095c8d40ddaFix compile with musl (lack of strndupa)If strndupa is not defined, use an in-house implementation using alloca() (code taken from https://goo.gl/roIJt6). Patch is based on work by Dennis Przytarski. https://bugs.openvz.org/browse/OVZ-6650 Signed-off-by: Kir Kolyshkin <kir@openvz.org>OVZ-6650
Dennis PrzytarskiDennis Przytarski
301168dee34Fix compilation with muslI'm packing the tool for Alpine Linux 3.3. Alpine Linux uses musl-libc as standard C library. These are the fixes I managed to resolve.
Kir KolyshkinKir Kolyshkin
a4d3972dca8MMerge pull request #3 in OVZL/vzctl from ~FUSL/vzctl:master to master* commit '7adf0e57a0f240ce8bc64577dc40edcccbdeb4df': Fixed typo "remove" -> "remote"
FuslFusl
7adf0e57a0fFixed typo "remove" -> "remote"
Kir KolyshkinKir Kolyshkin
02cdc246454vzctl destroy: handle the semi-mounted ploopFor some reason, sometimes ploop is left semi-mounted (i.e. ploop device is present, but not mounted), and in such cases vzctl fails to destroy CT private: > # vzctl destroy 4956949 > Destroying container private area: /vz/private/4956949 > Warning: failed to remove /vz/root/4956949: Device or resource busy > Container private area was destroyed Alternatively, such a semi-mounted container d...OVZ-6553
Kir KolyshkinKir Kolyshkin
201b4e1e780ve_is_mounted(): describe the ploop semi-mounted caseI know it looks weird, but this is it -- originally I wanted to modify vps_is_mounted() is it would return "mounted" in case ploop device is mounted. But it would be a wrong thing to do since if CT status is "mounted", CT files are expected to be available from VE_PRIVATE, and it's not the case. So, the code is all here but it's commented out. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
c2d3e1b0590vps_is_mounted(): pass the whole fs_paramWe gonna need the layout field in the next patch. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
bdec3b4bf3evzlist: get_ves_layout(): merge into get_mounted_status()This will be needed by the next patch. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
cb4a7e3b0d3vzmigrate: rm bashismAs reported by shellcheck, there's no 'let' in POSIX shell. Interestingly, dash supports it so I guess we're good, but let's fix it in the interest of purity. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ce632305063vzubc: rm unused varSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
91beb57f47bvz_restore: rm unused codeThis is a left-over after commit ae3ce45. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Sergey BronnikovSergey Bronnikov
cf1c5b50b18Released vzctl 4.9.4Changes: see https://openvz.org/Download/vzctl/4.9.4/changes
Igor SukhihIgor Sukhih
74985e4eef0MMerge pull request #1 in OVZL/vzctl from ~IBAZHITOV/ovz-vzctl:sec to master* commit '22d967c336de3db0d30dae2bb7b2a9a69a0686de': Store VE layout to VE config on start Store VE layout in VE config during create and convert Move layout and mode fields from vps_opt to fs_param config: constify input path src/.gitignore: add vzfsync, vznnc bin/.gitignore: add vzoversell
Igor BazhitovIgor Bazhitov
22d967c336dStore VE layout to VE config on startThis will help those, who didn't set the VE_LAYOUT into per-VE config manually. On the next CT start the autodetected VE layout would be saved in the VE config. Signed-off-by: Igor Bazhitov <ibazhitov@virtuozzo.com>
Igor BazhitovIgor Bazhitov
9e98ea630acStore VE layout in VE config during create and convertVE layout (ploop or simfs) is automatically detected based on presence of "root.hdd/DiskDescriptor.xml" file inside the VE private directory. Imagine that inside a simfs CT this file is created by some malicious user, which has root privileges there. When vzctl starts a CT, it would mistakenly autodetect the CT as being the ploop one! This design flaw leads to a certain kind of attack vectors, ...
Igor BazhitovIgor Bazhitov
3116b1fc255Move layout and mode fields from vps_opt to fs_paramThis is a preparation for saving VE layout in a per-VE config file. Moving the layout and mode fields to struct fs_param will save us plenty of various functions parameters changes. Signed-off-by: Igor Bazhitov <ibazhitov@virtuozzo.com>
Igor BazhitovIgor Bazhitov
3ad329bb6c0config: constify input pathSigned-off-by: Igor Bazhitov <ibazhitov@virtuozzo.com>
Igor BazhitovIgor Bazhitov
2786e96f2bfsrc/.gitignore: add vzfsync, vznncSigned-off-by: Igor Bazhitov <ibazhitov@virtuozzo.com>
Igor BazhitovIgor Bazhitov
f518005b43cbin/.gitignore: add vzoversellSigned-off-by: Igor Bazhitov <ibazhitov@virtuozzo.com>
Kir KolyshkinKir Kolyshkin
0d841aef199Released vzctl 4.9.3Changes: see https://openvz.org/Download/vzctl/4.9.3/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kirill KolyshkinKirill Kolyshkin
c18483d1b89MMerge pull request #2 from zzmp/feat/vps-net_add-force-routevps-net_add: add FORCE_ROUTE to change existing route to container
Zach PomerantzZach Pomerantz
91e700b9a26vps-net_add: add FORCE_ROUTE to change existing route to container
Kir KolyshkinKir Kolyshkin
485cb193459vzctl umount: fix exit code if CT is runningFixes the following issue: # vzctl umount 10101 Container is running -- stop it first # echo $? 0 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
24f939e8159vzoversell: handle unlimited RAM CTsSome containers might be configured as unlimited (i.e. infinite physpages and privvmpages limit). Also, a container might appear as unlimited while it is being restored from dump (as beancounter limits are initially set to unlimited and only set to proper values at the end of the restoration process). In case such unlimited containers are present, overcommitment figures shown doesn't make sen...
Konstantin VolckovKonstantin Volckov
137c14b2756set_console.sh: ubuntu 15.04 systemd console supportReference: PCLIN-32529PCLIN-32529
Kir KolyshkinKir Kolyshkin
cb7cd395f6bReleased vzctl 4.9.2Changes: see https://openvz.org/Download/vzctl/4.9.2/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
869f8d8cb77store_devnodes: fix NULL derefAs pointed out by Linas Žilinskas in bug #3228, we should check name for being non-NULL here. https://bugzilla.openvz.org/3228 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b0409ff0bf0vps-create.sh: use stat -f instead of dfOn a node with a stale NFS mount (not related to /vz), vzctl create fails after a long timeout. It happens because vps-create calls df $VE_ROOT, but for some odd reason df wants to stat() all the mount points and it hangs for a while and then fails on that stale mount. The solution is to use stat -f rather than df. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4d4c21e1dbevzctl.spec: require attr packageIt never occured to me that setfattr can not be available, but it happens: # vzctl create ... ... Performing postcreate actions /etc/vz/dists/scripts/postcreate.sh: line 119: setfattr: command not found ... So, let's require it from spec file. This is an addition to commit f537353. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b7d68dbd360Released vzctl 4.9.1Changes: see https://openvz.org/Download/vzctl/4.9.1/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
cf652d0df15vzctl.spec: drop the Conflicts: vzkernelThe change this patch is reverting was introduced to fix bug #3094. Unfortunately, it breaks the update for RHEL5-based OpenVZ kernels, which is the subject of bug #3219. The only solution I found is to list all the old RHEL6-based kernel explicitly. It would be good enough, but looks ugly. As the newest RHEL6-based kernel conflicting with this vzctl is at least 2 years old, let's just drop t...
Kir KolyshkinKir Kolyshkin
3774851d661create_hardlink_dir(): fix wrong owner/perms caseIn case CPT_HARDLINK_DIR exists, is a directory, but its ownership and/or permissions are wrong, the best course of action is not to remove it, but just fix what's wrong. This is what this patch does. In addition: * mark create_hardlink_dir() as static (as it should be) * report and return a potential error from stat() syscall, (as it should not happen and if it is, it's probably fatal) Th...
Kir KolyshkinKir Kolyshkin
4a4beac565cReleased vzctl 4.9Changes: see https://openvz.org/Download/vzctl/4.9/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d375c03ea52vzmigrate: check CPU caps for suspended CTThis commit adds a check for CPU capabilities when migrating a suspended container. Such a check is needed because if CPU caps differ, a container might not survive restore after migrating. To implement this check, a support from the kernel is required (CPT_TEST_CAPS ioctl for /dev/cpt). Such support was errorneously removed from the kernel 042stab101.5, but then restored in 042stab107.1, so a...
Kir KolyshkinKir Kolyshkin
8e02bf02b70vzmigrate: fix for vzfsync if VE_PRIVATE differsWhen referring to DDXML, we assumed VE_PRIVATE == VE_PRIVATE_REMOTE which is not always the case. Fix it. https://bugzilla.openvz.org/3170 Reported-by: toumin <983510@gmail.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org>