Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Kir Kolyshkin | bdaafe22773 | Released vzctl 4.7Changes: see http://openvz.org/Download/vzctl/4.7/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 57dc422ffd6 | vzctl 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 Kolyshkin | a8648c280c1 | vzmigrate: 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 Maurer | 10d2eeae94b | etc/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 Kolyshkin | b040acff756 | etc/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 Kolyshkin | 5345a40c240 | Use 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 Kolyshkin | 9e9315fb2e8 | etc/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 Kolyshkin | 56f9474fee3 | Removed 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 Kolyshkin | 9b8afa65494 | Introduce 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 Kolyshkin | c982b546fe0 | etc/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 Kolyshkin | 1263ea3d739 | parse_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 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 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 Kolyshkin | 842ae637c06 | vzmigrate: 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 Kolyshkin | b9187326cfe | vzcptcheck: fix program name in usageSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | cc1658b3381 | vzmigrate: 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 Kolyshkin | 9bdd1818eb3 | vzctl 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 Kolyshkin | a92e555052c | vzmigrate: hide ploop getdev outputNo sense in showing it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 69bbe91ae22 | vzmigrate: 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 Kolyshkin | 93f3e72d428 | vzmigrate: break a long lineSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ef320d32a4c | vzctl 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 Kolyshkin | 98e829ddca4 | vzctl_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 Kolyshkin | 4efa42b07ab | vzctl 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 Kolyshkin | 5e26d8e0c9b | vzctl(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 Kolyshkin | 45d499aeb39 | destroy_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 Kolyshkin | 5fe9c262024 | vzctl 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 Kolyshkin | e4a35c0f8d6 | vzctl 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 Kolyshkin | 63c2f83bfcd | vzctl_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 Kolyshkin | af31004e30f | vzctl_env_switch_snapshot(): rename a params/param/switch_param/ for struct ploop_snapshot_switch_param Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 7ce7733f69b | vzmigrate: 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 Kolyshkin | eaed966bbcf | vzmigrate --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 Kolyshkin | d89f03858f0 | vzmigrate: use $VZCTLSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | a5c73cb399e | vzctl 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 Kolyshkin | 460738d39e6 | vzctl_env_snapshot_list(): compilation fixBroken by commit 3248826 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 358b675133c | vzctl 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 Kolyshkin | 3248826dba5 | vzctl 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 Kolyshkin | 9657804113c | vzmigrate: whitespace cleanupReplace 8-spaces with tabs. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 10bc885f910 | Add 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 Kolyshkin | bef04938db3 | add_dist_action(): use macro...to avoid code repetition. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ef926e680af | [style] include/dist.h: use enum instead of defineIt's nicer this way. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Oskar Groh | b0e7730978e | vzmigrate: 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 Kolyshkin | 1405a89682f | config.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 Kolyshkin | 830afeaa921 | vz.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> | |||
Kir Kolyshkin | 917bad7aff8 | logger.c: fix wrt ploop loggingThere were a few problems with the way ploop logging was set up. First, ploop.set_verbose_level() was set from g_log.level, not from g_log.verbose. Second, when changing quiet or verbose level, we need to call ploop.set_verbose_level() with the appropriate arguments (either g_log.verbose or, if quiet is set, PLOOP_LOG_NOCONSOLE). Third, init_log() doesn't have to call ploop.set* directly, si... | |||
Kir Kolyshkin | a8009a02e8d | setver.sh: make it work on fresh git sourceIn case we have just checked out vzctl from git, we need to run autogen.sh and configure for the first time. Rather than to remember about it, let this mighty script do the work. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | fcaac08dae6 | bash_completion.d: add --quiet to vzctlWhen completing snapshot IDs for snapshot-switch etc, vzctl needs to be quiet, i.e. output nothing but the snapshot IDs. In case VERBOSE is set to high value in /etc/vz/vz.conf it might not be the case: [root@ce6 vzctl]# vzctl snapshot-list 110 -H -ouuid The ploop library has been loaded successfully {625f9ea2-9e8d-43be-ab46-de50344b8968} .... Which leads to this funny effect: [root@ce6 vzct... | |||
Kir Kolyshkin | 05ee1bde75c | vzctl snapshot-switch: add --skip_arpdetect optionIf snapshot was done while CT was running, CT will be restored from the dump file. While restoring, vps-net_add script is called which, among the other things, calls arpsend to check if CT IPs are used elsewhere. arpsend sends an ARP request for IP and waits for up to one second for reply. In case CT IPs are not changed from the current state, there is no sense to run arpsend. So, add the opti... | |||
Kir Kolyshkin | b6ec03aff18 | vzctl restore: warn in CPT_SET_LOCKFD2 not supportedIn case we have very old kernel, in which CPT_SET_LOCKFD2 is not supported, do warn about it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | d1176e70037 | vzlist: don't spoil output with ploop messagesploop library is pretty verbose, and some of the ploop functions we call might end up printing something to stdout. This is especially bad if -j is used, but even without it it's not good. So let's use ploop_set_verbose_level() to fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | d2cb64ec2d6 | setup_hardlink_dir(): fix compilationThis is a fix to previous commit fc28d18. Signed-off-by: Kir Kolyshkin <kir@openvz.org> |