Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Kir Kolyshkin | a3f8f060135 | Released vzctl 3.0.25 CHANGES (since vzctl-3.0.24.2) * Removed cron scripts to handle cleanup and reboot (#1423) * Introduced vzeventd to handle cleanup and reboot (#1519) * vzctl start/runscript: add ability to set per-CT osrelease (/etc/vz/osrelease.conf) -- support for Fedora 14 etc. (#1709) * vzctl set --pci_{add,del}: add the ability to move PCI devices to CT * Removed FAKEGATEWAY routing for all distro... | |||
Kir Kolyshkin | 62596d16045 | etc/init.d/vzeventd-redhat: prevent second startIf $lockfile is present, do not start again. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 6f929a78349 | vzeventd: be more quietPrint "Started" to log later (after daemonizing), therefore leaving stdout clean. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 3bf621636ab | vzctl.spec: make sure to start vzdaemon after upgradeIf vz is running and vzeventd is not -- start it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 2ca87e0966d | src/vzeventd.c: fix compile on CentOS 4Old and ancient CentOS4 glibc-kernheaders package provides /usr/include/linux/netlink.h which does not #include <linux/types.h> so we have to do it explicitly, otherwise: CC vzeventd.o In file included from vzeventd.c:25: /usr/include/linux/netlink.h:22: error: syntax error before "__u32" /usr/include/linux/netlink.h:28: error: syntax error before "__u32" /usr/include/linux/netlink.h:30:... | |||
Andrey Vagin | e8a76d31a58 | Add the ability to move PCI devices in CTSigned-off-by: Andrey Vagin <avagin@openvz.org> | |||
Andrey Vagin | 115195e77b5 | Add vps-pci scriptThis script will be executed after moving pci device in container. [kir@openvz.org: shell script style improvements, added missing C includes] Signed-off-by: Andrey Vagin <avagin@openvz.org> | |||
Andrey Vagin | 10c652a7eb1 | update include/linux/vzcalluser.h (v2)Signed-off-by: Andrey Vagin <avagin@openvz.org> | |||
Andrey Vagin | ea64ee6b9a4 | vzctl: allocate a device name dynamicallyBefore this patch a device name has been limited by 32 symbols Now we want add input device for exmple: /dev/input/by-path/pci-0000:00:12.0-usb-0:3:1.1-event Signed-off-by: Andrey Vagin <avagin@openvz.org> | |||
Andrey Vagin | 913ebc6bc9f | vzctl: code refactoring in free_devSigned-off-by: Andrey Vagin <avagin@openvz.org> | |||
Andrey Vagin | 019e6fc2c29 | vzctl: device name may contains colons, so take last for parse permsSigned-off-by: Andrey Vagin <avagin@openvz.org> | |||
Solar Designer | 9ae1302bbe5 | scripts/vps-create: fix VE_PRVT permissionsScript's $VE_PRVT is something like /vz/private/100.tmp, which will be renamed into the new container's tree root directory (/vz/private/100 in this example). Some templates do not include an entry for "." or "/". When these are used (with "vzctl create") on a host system with umask 077 (Owl's default), this resulted in the new system's root directory having mode 700, and in turn in all sorts ... | |||
Kir Kolyshkin | c1e7b64e934 | scripts/vps-create: use -Sp options for tar-S: handle sparse files more effectively -p: ignore umask, use exact permissions from the archive Reported-by: Solar Designer <solar@openwall.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f62b006905b | vzctl set --features bridge: enable CAP_NET_ADMINCapability CAP_NET_ADMIN is required for VE_FEATURE_BRIDGE to work, so let's raise it automagically. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Solar Designer | 8b92f8efbcf | etc/dists/scripts/*set_ugid_quota.sh: fix mtab permsIn *set_ugid_quota.sh scripts, set the permissions on /etc/mtab to 644 regardless of the current umask. | |||
Kir Kolyshkin | 5a1014ac69e | etc/vz.conf: fix English in a comments/do/does/ From the OWL linux vzctl patches. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 99970893815 | Fix enabling sysfs feature by defaultThe problem caused by this bug is if some other features are explicitly set, SYSFS is not enabled by default. From Solar Designer: """ This commit looks buggy to me: http://git.openvz.org/?p=vzctl;a=commit;h=vzctl-3.0.23-262-g2660464 - if (!(res->env.features_known & VE_FEATURE_SYSFS) && - sysfs_required(res)) { + /* sysfs enabled by default, unless explici... | |||
Kir Kolyshkin | 5ae864833e3 | etc/ve-basic.conf-sample: increase LOCKEDPAGESRecent distros (Fedora 14 and Ubuntu 10.10) want more. Make them happy. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ee27b83b15c | vzlist: introduce uptimeSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 84d1e21561b | vzlist: rename Cla to CcpustatShould not have any visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 2f8052666a6 | vzlist.h: load average should be floatNo need for double precision here. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 927213603d4 | src/lib/util.c: remove an unused functionNobody uses it, and the name is too generic. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f0a858dde08 | vzctl start/runscript: add ability to set per-CT osreleaseSome distros (like recent Fedora versions) expect a kernel version to be x.y.z or newer, and won't work with older kernels. Our kernels are usually sufficiently patched to work with new userspace, but this check for kernel version requires some trickery. Introduce /etc/vz/osrelease.conf to have these requirements configurable. Use new /dev/vzctl ioctl to set per-CT osrelease field, based on di... | |||
Kir Kolyshkin | 849cd39350a | scripts/.gitignore: updateRecent commits (like 4cc6257616 and 5b3579775) removed some scripts, added some different ones. Update gitignore accordingly. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ecc86b67f66 | src/arpsend.c: cleanups1. Make it fit 80 columns 2. Fix English in comments and variable names. 3. Remove one trivial once-used define. | |||
Kir Kolyshkin | de504a6d62c | src/arpsend.c: fix a compiler warningFix a long-standing compiler warning: arpsend.c: In function ‘create_arp_packet’: arpsend.c:354:3: warning: missing initializer arpsend.c:354:3: warning: (near initialization for ‘(anonymous).sndr_hw_addr’) Should have no visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | fc699530bb5 | src/lib/quota.c: compilation fixFix after commit 788cb03b. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 01ea58ce2db | src/lib/exec.c: flush stderr/stdout fefore fork() in vzctl_exec*()Otherwise it might be flushed twice after fork(), producing extra garbage as a result. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 3063fa71631 | src/lib/exec.c: add a comment explaining the reason for fork()Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 788cb03bea6 | quota_ctl(), vps_set_quota(): refactor/fixThere is no need to do hairy trickery with return values in quota_ctl() -- always return the exit code of vzquota. In vps_set_quota(), when we run quota_ctl(STAT2), we need to find out if UGID quota is running or not. If it's not running vzquota returns exit code of 9, which we check for. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | b63910d235f | vps_set_quota(): return proper error codeWe should return VZ_DQ_SET here in case of error like this, because this code is used as an exit code of vzctl and -1 just doesn't make sense here. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | f7bb97c6eea | src/lib/quota.c: don't check for dq_param == NULLThere is no need to check for dq_param == NULL here, it can never be NULL. Also, the return code of -1 is bad because these functions are expected to return codes suitable as vzctl exit codes. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 9783f43546b | man/vzctl.8: add/describe 'vzquota on failed' exit code (60)After commits d75908d0 and 84f9ab9329 vzctl may now exit with VZ_DQ_ON (60) exit code, which means 'vzquota on failed'. Document it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 84f9ab9329e | quota_on(): refactor and fixThis is more of a fix than proper refactoring. So what I tried to achieve is: 1. Return proper code (one of VZ_DQ_ON, VZ_DQ_INIT, VZ_DQ_SET) depending on what really failed. 2. Do not print errorneous "vzquota on failed" with wrong exit code for the case of failed quota_init() or quota_set(). Note that quota_init() and quota_set() print their own error messages and return correct... | |||
Kir Kolyshkin | 767a651bfd6 | vzctl set --devnodes: always try to recreate device in CTIf device file already exists inside a container, do not trust it, it might be bad (not a device file, invalid/old major/minor etc). Always re-create device file from scratch. Reference: PCLIN-28558 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | PCLIN-28558 | ||
Kir Kolyshkin | f52f28f1071 | vzctl quotaoff: fix wrong exit code if quota is not runningIf quota is not running, we should not return an error when trying to turn it off. There is such a code already, but it forgot to set ret to zero, therefore the native exit code from vzquota (6) was returned by vzctl which makes no sense (for vzctl 6 means "Not enough system resources"). Fix it by 'ret=0' in case quota is not running. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 237f03c9480 | vzctl --help: improve/reformat, add quota* commandsFirst, let's just use one single fprintf. Should not have any visible effect per se. Second, make sure we fit into 80 columns (moving --netif_del to another line). Third, change the order of commands (first create, then start, then anything else). Fourth, introduce a few empty lines for better readability. Finally, add quotaon/quotaoff/quotainit commands. Signed-off-by: Kir Kolyshkin <kir@... | |||
Kir Kolyshkin | 51ebab04b1a | bash_completion: add quotaon/quotaoff/quotainitSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | ff26307b24d | man/vzctl.8: describe quotaon/quotaoff/quotainit commandsSomehow they left undocumented until now. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | d75908d0e73 | vzctl quotaon|quotaoff|quotainit: report and return error if disk quota is disabledIf disk quota is disabled (either globally or for this CT) do not just silently skip this step, but print an error message and return an appropriate error code. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 6d6afac9729 | etc/dists/scripts: trivial whitespace cleanupUse tabs instead of spaces in a few places where they should be. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | b40b1f31766 | man/*: fix/emphasize DISK_QUOTA/--diskquota descriptionGlobal config have a global default for DISK_QUOTA, which can be overriden on a per-CT basis. It was always working that way but was not documented. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | fdbadda2c01 | vzctl set --diskquota: do not overwrite command line with global parameterPrevious commit adds --diskquota option. Now we have this option in * cmd_p (parameters obtained from command line) * gparam (parameters from global config) * vps_p (parameters from CT config) For some reason (unknown to me) function merge_global_config put the dq.enable parameter from global ones and set it into cmd_p -- thus overwriting what we got from the command line. The fix is to remov... | |||
Kir Kolyshkin | 5c63ca79ead | vzctl set: implement --diskquota on|offSigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | a2de1caadf1 | man/ctid.conf.5: describe DISK_QUOTASigned-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 8431d988b44 | vzctl set --applyconfig: fix for DISK_QUOTAApparently if DISK_QUOTA parameter is set in the config sample we want to apply (using vzctl set --applyconfig), it is not saved into the configuration file. Fix it. Reported-by: Benjamin Henrion <bhenrion@ffii.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Cyrill Gorcunov | f9988a54c6a | Make use of ARRAY_SIZE macro helperCommit 67180379f529d989598b16e9906011245e753909 introduced ARRAY_SIZE helper. Let's use it wherever possible. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> | |||
Kir Kolyshkin | 808c24793ea | man/vzctl.8: document 'suspended' statusCommit edaa98b92b7f87e49c999c0df55eabfe8da9770c introduce 'suspended' for 'vzctl status'. It was not documented yes, so go ahead and do it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 92f8c756df1 | man/vzctl.8: describe action scriptsFinally I did it. http://bugzilla.openvz.org/1273 Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 286cf100c2f | vzctl delete: take care of premount/postumount scripts.Commit eeceb721472483f6e8d90cbfe72967c3336b5e77 added support for premount/postumount action scripts. Unfortunately it forgot to remove those when destroying a container. This might lead to a situation when a newly created container will use the old scripts left from the deleted container with the same ID. Fix it. Signed-off-by: Kir Kolyshkin <kir@openvz.org> |