OpenVZ-legacy
  1. OpenVZ-legacy

vzctl.ovzl

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
fa8913dbf21vzctl 4.7.2 releaseChanges: https://openvz.org/Download/vzctl/4.7.2/changes (this is a respin due to format error in .spec file) Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
44e81837e29vzctl 4.7.1 releaseChanges: https://openvz.org/Download/vzctl/4.7.1/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
23efce7eb39vzctl(8): fix a typoIntroduced in commit 3fc3f7a. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit a1e5c72b9499d156963190111bffaf539c3be973)
Kir KolyshkinKir Kolyshkin
f2f48fd456csetup_console: don't execute on older kernelsAs it was pointed out on users@ mailing list and in bugzilla, vzctl console functionality is only available on RHEL6 kernel, so there is no need to set up getty on an older (RHEL5) kernel. Neither there's a need to do that on vanilla (non-openvz) kernel. More to say, such getty configuration is bad if console is not working, as it will lead to ever-restarting getty processes, increased CPU usa...
Kir KolyshkinKir Kolyshkin
28ab3210d92compare_osrelease(): fix for 3.x kernelsWith kernel 3.0, the patch number might as well be absent, so instead of failing let's assume it is zero. Not tested. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit c9ec4fe9638c4a599d2135cc1f7b0a6f0ccd47e4)
Kir KolyshkinKir Kolyshkin
4fc16bfc81eclean_hardlink_dir(): note unlink/rmdir errorsJust make sure if there are any errors they are not left unnoticed. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 3d569f784de2aee171237ad1c853a0dd7188c254)
Kir KolyshkinKir Kolyshkin
5b0229e8320vzlist: don't complain about missing ploop-libCommit d1176e70037 introduced a way to silence ploop lib for vzlist, since in vzlist we don't want to see anything on stdout. The problem with that commit is it unconditionally calls is_ploop_supported() which tries to load ploop library and complains if it is missing, even then it is not needed: [root@ce6 ~]# vzlist -a Can't load ploop library: libploop.so: cannot open shared object file: ...
Kir KolyshkinKir Kolyshkin
bdaafe22773Released vzctl 4.7Changes: see http://openvz.org/Download/vzctl/4.7/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
57dc422ffd6vzctl create: default layout is ploopIf layout is not set (in command line or global config), and ploop is supported, use ploop by default. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
a8648c280c1vzmigrate: don't use ploop snapshot-list -sOption -s of ploop snapshot-list only appeared in ploop 1.11, and we can't expect it to be available (nor it makes sense to depend on it for this option). So, just drop -s option and filter out the top delta filename using sed. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Dietmar MaurerKir KolyshkinDietmar Maurer
10d2eeae94betc/network/if-up.d/vzifup-post: fix for WheezyWhen the following command is ran on Debian Wheezy service networking restart It calls: ifup -a --exclude=lo which sets $ADDRFAM == "meta" and $IFACE == "--all". This leads to a weird looking error from grep (unrecognized option --all). Fix is easy. https://bugzilla.openvz.org/2914 [kir@openvz.org: changelog, use single test expr with -o] Acked-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
b040acff756etc/vz.conf: merge IP6TABLES to IPTABLES_MODULESLooks simpler this way, and IPv6 is pretty much everywhere nowdays. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5345a40c240Use vswap config by default1. Modify /etc/vz.conf to have vswap-256m config by default. 2. Remove the logic of tuning default config from init.d/vz scripts. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9e9315fb2e8etc/vz.conf: use ploop by defaultAssuming all new installations are using RHEL6 kernel, and ploop is pretty mature already, it makes sense to have it as default. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
56f9474fee3Removed ve-unlimited.conf-sampleThis file was added in a pre-VSwap era, and doesn't make much sense for VSwap. Also, it was not working with ploop because of DISKQUOTA absense. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9b8afa65494Introduce NETFILTER option to replace IPTABLESA way to control which netfilter/iptables modules can be used inside a container was via --iptables/IPTABLES parameter. Unfortunately, it is complicated and confusing. Replace that with a new option --netfilter/NETFILTER which only has four options: · disabled no iptables allowed · stateless everything but conntracks and NAT is allowed (i.e. filter and mangle) · stateful everything but ...
Kir KolyshkinKir Kolyshkin
c982b546fe0etc/conf/*sample: tune DISKINODESIn the light of recent commit ef320d3 that adds support for specifying diskinodes on create or convert for ploop layout, it makes sense to tune diskinodes in sample configs to be the same as mkfs creates, i.e. 1 inode per 16K of disk space. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1263ea3d739parse_dq: allow suffix for diskinodesAllow to specify suffixes for DISKINODES parameter either in config or from the command line. If you want 100000 inodes, it's easier to say 100K. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
41ba60c4838[style] iptables.c: some refactoring1. Rename iptables to _g_iptables 2. Rename find_ipt() to find_ipt_by_name() 3. Add struct iptables_s* parameter to find_ipt_by_name(). 4. Switch from ARRAY_SIZE loops to "!= NULL" like it was before commit 8036cd3. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4a755f9db7f[style] parse_iptables: move to iptables.cThis lets us hide some internal details of iptables.c, like struct iptables_s. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
842ae637c06vzmigrate: introduce/use vzfsync for ploop deltasWhen performing live migration, container frozen time (i.e. the time between checkpoint on source and restore on destination node) is critical. One reason for restore delay that I found is when a container ploop is mounted just before the restore, adding ploop deltas can be slow. This is caused by the fact that deltas are not fully synced to disk, and therefore kernel forces the sync on every ...
Kir KolyshkinKir Kolyshkin
b9187326cfevzcptcheck: fix program name in usageSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
cc1658b3381vzmigrate: call vzctl status with --quietWithout --quiet, vzctl status output could be garbled if we run vzmigrate with -vv (or higher verbosity) as in such case vzmigrate calls vzctl with --verbose. Nevertheless, it's a bug in vzctl, not vzmigrate, and it is fixed by the previous commit 9bdd181. But we can't be sure it's fixed on the remote side, so always use --quiet. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9bdd1818eb3vzctl status, snapshot-list: don't mess with stdoutEven if quiet is set to 1 when parsing "status" argument, it is only applied after calling vps_parse_config() for global config (vz.conf). So, in a (rare but possible) case of possible warnings in global config and vzctl status called with --verbose, it garbles output, for example: # vzctl --verbose status 121 Warning at /etc/vz/vz.conf:63: unknown parameter SKIP_ARPDETECT ("yes"), ignored ...
Kir KolyshkinKir Kolyshkin
a92e555052cvzmigrate: hide ploop getdev outputNo sense in showing it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
69bbe91ae22vzmigrate: support for copying CT dump fileIn case container is in suspended state, it makes sense to copy its dump file as well, so it can be unsuspended on the destination. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
93f3e72d428vzmigrate: break a long lineSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ef320d32a4cvzctl create, vzctl convert: honor diskinodesFor ploop layout, there is no way to change diskinodes because of ext4 file system limitation. Therefore, there should be a way to specify inodes on container creation (or conversion). This patch does exactly that. On create or convert, diskinodes (if set) are used to calculate disk space required to have a requested number of inodes (based on the fact that by default it's one inode per 16K di...
Kir KolyshkinKir Kolyshkin
98e829ddca4vzctl_resize_image(): don't pass dq_paramAll we need (for now) is size and offline arguments. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4efa42b07abvzctl create: add --diskinodesAdd --diskinodes to vzctl create options. Document in vzctl(8). Add to usage synopsys and to bash-completion. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5e26d8e0c9bvzctl(8): rm extra formattingWith .OP, second word is typeset in italics anyway, so no need to explicitly specify \fI...\fR. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
45d499aeb39destroy_dump(): don't log "Removing" if no dumpCheck for dump file existence and return success if there is no file. This way we'll avoid printing Removing CT dump /vz/dump/Dump.121 in case there is no such file. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5fe9c262024vzctl snapshot-switch: add --skip-configAdd --skip-config, document in man page and usage, add to bash-completion. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
e4a35c0f8d6vzctl snapshot-switch: add --skip-resumeA flag to just switch to a given snapshot and leave CT in a stopped state. Documented in man page and usage, added to bash_completion. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
63c2f83bfcdvzctl_env_switch_snapshot: change parameters1 Remove fs_param since they can be obtained from g_p. 2 Pass full vzctl_snapshot_param instead of just guid. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
af31004e30fvzctl_env_switch_snapshot(): rename a params/param/switch_param/ for struct ploop_snapshot_switch_param Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
7ce7733f69bvzmigrate: lock CT locallyIntroduce proper CT locking so no other operation could be performed on container while it is being migrated. Add appropriate error code in case CT is already locked, and describe it in man page. Note we take lock before checking CT status and release it at the very end (or on error path). Hopefully, this will prevent bad situations from happening (say vzctl snapshot running in parallel with v...
Kir KolyshkinKir Kolyshkin
eaed966bbcfvzmigrate --live: check for running CT earlierIt makes sense to move a check for a running CT earlier in the code if we are doing live migration, so we report the error earlier. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d89f03858f0vzmigrate: use $VZCTLSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
a5c73cb399evzctl set --diskspace: add --offline-resizeFor ploop, sometimes it makes sense to do an offline resize. Add an appropriate option and pass it on to ploop library. Add possible sanity checks. Add to usage and bash_completion. Modify vzctl(8) man page accordingly. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
460738d39e6vzctl_env_snapshot_list(): compilation fixBroken by commit 3248826 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
358b675133cvzctl restore: fix wrt set_consoleCommit 10bc885 adds SET_CONSOLE script. The problem is we should not run it when restoring a container because (1) there is no need to (2) vps_exec_scripts closes an fd which is used as lock fd for the kernel As a result of (2), we have this bug: undump... Adding IP address(es): 10.1.121.110 Running: /usr/libexec/vzctl/scripts/vps-net_add Setting CPU units: 1000 Running container scri...
Kir KolyshkinKir Kolyshkin
3248826dba5vzctl snapshot-list: fix for VERBOSE>=1In case VERBOSE is set to a value higher than zero, vzctl snapshot-list ends up printing The ploop library has been loaded successfully just before expected output, which might screw up some scripts. To fix, set verbose to -1 to only print errors (which go to stderr). Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9657804113cvzmigrate: whitespace cleanupReplace 8-spaces with tabs. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
10bc885f910Add set_console dist scriptThis script is used to configure getty on /dev/tty1 (aka /dev/console) and /dev/tty2 inside a container. It is run by vzctl start. This is needed for vzctl console [1|2]. This should also fix bug #2865. https://bugzilla.openvz.org/2865 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
bef04938db3add_dist_action(): use macro...to avoid code repetition. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
ef926e680af[style] include/dist.h: use enum instead of defineIt's nicer this way. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Oskar GrohKir KolyshkinOskar Groh
b0e7730978evzmigrate: fix ploop for diff VE_PRIVATE caseAllow vzmigrate a ploop copy when VE private dir on source-host has a different path as on the target-host. This should fix bug #2875. https://bugzilla.openvz.org/2875 [kir@openvz.org: declare vars as locals] Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1405a89682fconfig.c: add SKIP_ARPDETECT to ignored listvzctl warns about unknown parameters in configuration file. Since we are now using SKIP_ARPDETECT in vz.conf (see previous patch), it complains: Warning at /etc/vz/vz.conf:63: unknown parameter SKIP_ARPDETECT ("yes"), ignored The reason is we don't read SKIP_ARPDETECT from vzctl, it is used by vps-net_add script which sources vz.conf. So, add SKIP_ARPDETECT to well known list of parameters...
Kir KolyshkinKir Kolyshkin
830afeaa921vz.conf: add SKIP_ARPDETECT exampleetc/vz.conf: add (commented out) SKIP_ARPDETECT with a short explanation etc/vz.conf: improve ERROR_ON_ARPFAIL description in vz.conf man/vz.conf(5): add SKIP_ARPDETECT, improve ERROR_ON_ARPFAIL description Signed-off-by: Kir Kolyshkin <kir@openvz.org>