OpenVZ-legacy
  1. OpenVZ-legacy

vzctl.ovzl

Public
AuthorCommitMessageCommit dateIssues
Kir KolyshkinKir Kolyshkin
aa245d57b2aReleased vzctl 4.4Changes: see http://openvz.org/Download/vzctl/4.4/changes Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Marc MAURICEKir KolyshkinMarc MAURICE
39c84837ce2debian-add_ip.sh: ignore comments when looking for venet0When starting a debian container, the /etc/vz/dists/scripts/debian-add_ip.sh script will do some checks to automatically overwrite debian interfaces config if the VM is in venet mode. When we leave some old commented venet configuration in /etc/network/interfaces, the script will detect it and overwrite it, even if we don't want to because the network is in veth mode. Steps to reproduce : 1. ...
Kir KolyshkinKir Kolyshkin
a347f10ad30[style] vzctl.spec: s/$RPM_BUILD_ROOT/%{buildroot}/Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
376cc3d2c5e[style] vzctl.spec: Use _configdir instead of /etc/vz/Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
8f58c9d0408[style] vzctl.spec: curly brackets for %_libdirs/%_libdir/%{_libdir}/ Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
a5aebc83385[style] vzctl.spec: s/$RPM_OPT_FLAGS/%{optflags}/Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3e319a93335[style] vzctl_mount_snapshot(): rm unneeded typecastBoth vzctl_mount_param.guid and ploop_mount_param.guid are of char * type, so there is no need to do casting here. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3da1927b492Implement nameserver/searchdomain inheritanceNow, if NAMESERVER/--nameserver and/or SEARCHDOMAIN/--searchdomain value is "inherit", the corresponding setting is taken from host system's /etc/resolv.conf. That way, a user don't have to do extra configuration step required for DNS to work inside a container. Note that per-CT parameters are inherited from the global /etc/vz/vz.conf, so we set NAMESERVER=inherit in vz.conf and therefore all ...
Andrey VaginKir KolyshkinAndrey Vagin
fa3ef2da0dact: fix exec to really enter into pidns (v3)setns() of the pid namespace unlike unsharing of other namespaces does not take affect immediately. Instead it affects the children created with fork and clone. v2: don't forget about the end mark in close_fds v3: use nice and dandy env_wait() https://bugzilla.openvz.org/show_bug.cgi?id=2658 Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Kir KolyshkinKir Kolyshkin
ce7386b8c8d[build] configure: set localstatedir to w/o prefix/var should be /var, not /usr/local/var or /usr/var. Currently we work around this by supplying --localstatedir argument to ./configure in vzctl.spec, but people building/installing from source have bad paths as a result. So, use the same trick as we did for sysconfdir in commit 2e95e285. https://bugzilla.openvz.org/show_bug.cgi?id=2637#c2 Reported-by: hoverhell@gmail.com Signed-off-by: Kir ...
Kir KolyshkinKir Kolyshkin
867cb8dd5d0[build] configure.ac: change indentation... when printing configuration results. To be used by the next patch. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
abdb53410a7[build] fix for automake < 1.10.2If someone wants to build vzctl from git on a RHEL5/CentOS 5 system (or other similar system having automake < 1.10.2), they will discover that pkglibexecdir is not set and scripts are installed to /scripts. We could have said (in configure.ac) AM_INIT_AUTOMAKE([1.10.2 to require newer automake, but since we are still supporting RHEL5 let's workaround by setting pkglibexecdir manually. NOT...
Kir KolyshkinKir Kolyshkin
d7550297e03vzlist -j: fix to work on RHEL5 kernelvzlist --json is not working on RHEL5 kernel. The problem is caused by the fact that in JSON mode all the parameters are listed by default, and in RHEL5 kernel there is no way to get the value of cpus field from the running container. vzlist should just ignore it, instead it fails. Fix to skip cpus collection in case it's not available. https://bugzilla.openvz.org/2661 Reported-by: Pavel Odi...
Kir KolyshkinKir Kolyshkin
1532757cc10vzmigrate: add ability to ignore some checksMore preliminary checks were introduced recently to vzmigrate, such as ipv6 module check (commit 9198710) and cpu capabilities compatibility check (commit e22c459). Say, for CPU flags, there is no easy way to find out whether or not these capabilities are used by applications running in a particular container -- but if they are, migration will fail. So, to be on the safe side, vzmigrate is not...
Kir KolyshkinKir Kolyshkin
3b111057330vzmigrate --help: simplify synopsysDon't mention all possible option in synopsys since there are too many of them. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d182e4391e9vzmigrate(8): rm extra vertical spaceThis empty line should not be here. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d84e63625cavzmigrate(8): remove dupRemove duplicate --live option. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
695037060cbvzmigrate: improve invalid cmdline handingThis patch changes the way vzmigrate reacts to invalid command line. Now, instead of showing a screen full of options, it just tells what's wrong with the command line, and gives a hint on where to read about the correct syntax, so the error is more clear. Also, if --help, -h, --usage, or -? were given, or no options at all, it shows usage as before. Exit code logic is also fixed. When showin...
Kir KolyshkinKir Kolyshkin
c4cd685ec25vzmigrate: whitespace cleanupAfter commit 0853972. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
95f4171d131vzctl start: fix --skip-fsck option parsingThis is a fix to a stupid bug in commit 83aec226 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Andrey VaginKir KolyshkinAndrey Vagin
eb55607fce4Fix compilation on arches without support for VZhttps://bugzilla.redhat.com/show_bug.cgi?id=971821 Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Andrey VaginKir KolyshkinAndrey Vagin
92a8301f1dfscripts/vps-rst: make VE_VETH_DEVS optionalIt is empty in case CT does not have any veth devices. https://bugzilla.openvz.org/show_bug.cgi?id=2659 [kir@openvz.org: modify var description accordingly] Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
6743f0a3123create.c: fix warnings compiling w/o ploopFix these: > CC create.lo > create.c: In function 'cleanup_umount_ploop': > create.c:108:2: warning: implicit declaration of function > 'vzctl_umount_image' [-Wimplicit-function-declaration] > create.c: In function 'fs_create': > create.c:132:37: warning: unused variable 'ploop_ch' [-Wunused-variable] > create.c: At top level: > create.c:106:13: warning: 'cleanup_umount_ploop' defined ...
Kir KolyshkinKir Kolyshkin
99554c9175cDo enable ploop fsck on start, require ploop 1.8* vzctl.spec: require ploop 1.8 * configure.ac: check for fsck field of appropriate struct * vzctl_mount_image(): uncomment fsck flag passing to ploop Basically this enables fsck for inner ploop filesystem on mount, as it was promised in commit 83aec22. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
68cf01b5ca6etc/vz.conf: comment out NEIGHBOUR_DEVS by defaultThis is a better default with higher chances it will work out of the box. In case someone needs to limit ARP announces, they can uncomment. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5ee148fa463vzctl convert: rename old private back if failedIf the final rename failed, let's try to rename the old one back and warn a user if we failed. This is an addition to previous commit, related to bug #2638. https://bugzilla.openvz.org/2638 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
4da7ef8556fvzctl convert: fix final renamesAt the end of conversion, we used to do: - remove the old private area - rename the newly created one to the proper name All this was done without any error checking, so if removing fails, then renaming fails as well, and then there's no way to roll back (because we might have already removed the old private). Instead, let's do this: 1. Rename old private to temp 2. Rename the new private to...
Kir KolyshkinKir Kolyshkin
225cbacf81evzctl_env_convert_ploop(): fix mkdir modeIt should be 0700 not 0600. As a result, a container converted to ploop had wrong mode: # ls -ld /vz/private/1031 drw------- 3 root root 4096 Jul 3 03:35 /vz/private/1031 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
1df929b5b74vzctl_env_convert_ploop: fix a commentThe comment describing what the function does in details was obsoleted and not up to date. Remove it. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
5b639aad424destroydir: don't return -1vzctl destroy flow is this: main() run_action() destroy() vps_destroy() vps_destroy_dir() destroydir() and in case destroydir() returns non-zero the value is returned from main. Therefore, we can't return -1. Use the appropriate VZ_* error codes. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
68038a50729scripts/vps-netns_dev_add: rework config actionCommit 4fdbcb5 adds required parameter ACTION to vps-netns_dev_add script, but ct_netdev_ctl() and ct_ip_ctl() do not set it. That leads to the following bug: When trying to start a container with configured `IP_ADDRESS`, it fails with the subj message ("vps-netns_dev_add ERROR: Missing parameter: ACTION"). Instead of setting required parameter ACTION, let's just set optional parameter SKI...
Kir KolyshkinKir Kolyshkin
29f95153be2Do not save STOP_TIMEOUT=-1 to configstop_timeout of -1 means "not set" so we should not save it to config. This is a fix to previous commit 7ebd103 Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
7ebd103bcf0Add --stop-timeout/STOP_TIMEOUT parametervz.conf, ctid.conf: add STOP_TIMEOUT parameter vzctl set: add --stop-timeout option vzctl stop: use configured timeout man/*: describe it, explain timeout in vzctl stop bash-completion: add https://bugzilla.openvz.org/2621 Reported-by: Stefan Schlesinger <sts@ono.at> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
bea13670df9[style] MAX_SHTD_TM: rename to DEF_STOP_TIMEOUTSigned-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d93d1a62b54src/lib/config.c: introduce and use conf_store_int()Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
82374fb68d5[style] remove a few *CPUUNITS definesWe don't use all these three, defined in two places. We only use one, so let's leave it and rename to a more understandable name. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
83aec2262d7vzctl start: do fsck for ploop, add --skip-fsckThis patch adds (1) Setting fsck flag for ploop_mount on CT start (2) Option --skip-fsck for vzctl start command (together with man page and bash_completion changes) (3) Using --skip-fsck from init.d/vz script NOTE that while everything is in place, fsck flag is not actually passed on to ploop library. It is because the current version of ploop library released (1.7.1) does not have it ye...
Kir KolyshkinKir Kolyshkin
6707bc2bcc1start(): pass skip flags to try_restore()This is required by the following patch. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
595a38a825avztmpl-dl(8): addThis is a man page for newly added vztmpl-dl tool. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
3fc3f7a73c4scripts/vps-download: rename to /usr/sbin/vztmpl-dlThis script, while used by vzctl create and bash-completion script, can also be used directly by users. So let's move it to /usr/sbin and rename to vztmpl-dl. Man page will follow. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
d8ec00d62f1scripts/vz-postinstall.in: silent sysctl -pThere may be some parameters in /etc/sysctl.conf which are not set by this script and are not applicable to the current system. An example from CentOS 6 system is this one: error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key Let's suppress these errors fro...
Kir KolyshkinKir Kolyshkin
73918d0aad5Introduce vz-postinstall scriptIn order to make installation easier, let's introduce the script which will set up /etc/sysctl.conf and /etc/sysconfig/selinux. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
30fc126aeeascripts/.gitignore: add vps-rst-envThis is an addition to commit 8a1e2d9. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
9bd35704e69Deny "unlimited" value for DISKSPACE/DISKINODESUsing a special value of "unlimited" was intended for user beancounters parameters only. But since the same parsing functions are used for diskspace and diskquota parameters, there was an ability to use "unlimited" for these. This patch disables this. Using "unlimited" for diskspace and diskinodes is just plain wrong. For simfs/vzquota based container, the proper way of having unlimited disk ...
Kir KolyshkinKir Kolyshkin
bfe3f533a47Remove check for ploop sizeRemove check_ploop_size() introduced by commit 6905fc7, letting ploop library decide what size is supported. The reason for commit 6905fc7 was some people mistakenly had 'unlimited' as a value for DISKSPACE parameter in config. The proper fix would be to error out once we see 'unlimited' -- implemented in the next commit. Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
91de30237c1vps_mount(): rm duplicated codeIntroduced by commit fd75c37 Cc: Simon Boulet <simon@nostalgeek.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Mario KleinsasserKir KolyshkinMario Kleinsasser
0853972a0cbvzmigrate: use remote VZ_PRIVATE and VE_ROOTUse the remote VE_PRIVATE and VE_ROOT default path (vz.conf) for migration. This is required then VE_PRIVATE and VE_ROOT are different on source and destination nodes. [kir@openvz.org: fixed rsync error checking] https://bugzilla.openvz.org/2523
lopoKir Kolyshkinlopo
0c8d4724d30distscripts: update for newer Arch LinuxI updated vzctl distscripts for Arch Linux to support netctl and tried to get full backward compatibility for netcfg. https://bugzilla.openvz.org/2617
Kir KolyshkinKir Kolyshkin
91987102ecfvzmigrate: check ipv6 module on destIn case of live migration, if ipv6 module is loaded locally, it should also be loaded on the destination node. https://bugzilla.openvz.org/2555 Reported-by: Jim Faulkner <james.faulkner@yale.edu> Reported-by: Vasily Averin <vvs@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Kir KolyshkinKir Kolyshkin
01c2224e2d8vzmigrate: fix check for IPs when there are noneFrom the original bug report: > vzmigrate fails to migrate VPS when it has no IP addresses. It says IP > address is already used on destination node, which is not true. > > # vzmigrate destination 999 > Starting migration of CT 999 to destination > Error: IP address(es) already in use on destination node > > This worked fine in vzctl 4.2. It is not working in vzctl 4.3.1. This bug was introdu...