Commits
Author | Commit | Message | Commit date | Issues | |
---|---|---|---|---|---|
Kir Kolyshkin | f5773a426ca | Released vzctl-3.0.25.2This is a next stable update to 3.0.25, fixing the following bugs: * vzeventd: do not leave zombies * vzeventd: fix logging of killed children * vps-functions: make sure PATH contains dirs we need * rpm: add /etc/sysconfig/vzeventd as %ghost %config Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | 87eefb04654 | vps-functions: make sure PATH contains dirs we need'arpsend' is installed into our @SBINDIR@ (which can be /usr/sbin or /usr/local/sbin or something else). 'ip' usually lives in /sbin or in some cases /bin. Previously (in vzctl <= 3.0.24) we called in /sbin/ip, but commit 8894720 changes that. So, make sure all these dirs are in PATH, so we don't fail miserably, for example like this: $ sudo /usr/sbin/vzifup-post eth1 /usr/lib64/vzctl/scr... | |||
Kir Kolyshkin | 4cd65f461f8 | vzctl.spec: add /etc/sysconfig/vzeventd as %ghostTeach RPM that if this file exists then it's ours. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit e816ee05792dbd8038c905f06cb557acae05e840) | |||
Kir Kolyshkin | 154c13fa5f6 | vzeventd: fix child handler to avoid zombiesSometimes a signal is not delivered (and child_handler() is not called) for every single child exited or terminated, which causes zombies to appear. Use waitpid() and loop until all the children are properly reaped. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit d7ac02f58412526632ec7751aee56c04580be988) | |||
Kir Kolyshkin | df2118d65ad | src/vzevent.c: fix logging of child killedCheck for WIFSIGNALED was done under WIFEXITED which is just plain wrong, therefore we never got "Child killed" message. Fix it. While at it, change the message from 'was terminated' to just 'killed'. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 11ff8a43cb14b4b576a2810b74297cc7f419c4b0) | |||
Kir Kolyshkin | c54f71c574d | src/vzevent.d: simpler child handlerUse old-style singal handler function, we don't really need any of the fields provided by struct siginfo_t, and pid is returned by wait(). Pure simplification, should not have any visible effect. Signed-off-by: Kir Kolyshkin <kir@openvz.org> (cherry picked from commit 8afe85a38f4e4ae3e9bea8d3cfee794a119e5c9d) | |||
Kir Kolyshkin | c10f5c17bc3 | Released vzctl-3.0.25.1This is a stable update to 3.0.25, fixing the following regression: * vzctl set --devices: do not segfault (#1729) Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
Kir Kolyshkin | aa454f2fa01 | vzctl set --devices: do not segfault (v2)This is an addition to commit ea64ee6b9. It fixes segfaults in four different places when either '--devices' command line option and/or 'DEVICES=' parameter in configuration file is used. http://bugzilla.openvz.org/1729 Reported-by: Vyacheslav Nikitin <alien.virus@gmail.com> Reported-by: Paparaciz <helpaz@gmail.com> Reported-by: frank <frank@si.ct.upc.edu> Signed-off-by: Kir Kolyshkin <kir@op... | |||
Kir Kolyshkin | 6e776e3494e | Revert "vzctl set --devices --save: do not segfault"This reverts commit ba865963f38c747b0732db0ff8401ff5184db1b8. The proper fix will follow. | |||
Kir Kolyshkin | ba865963f38 | vzctl set --devices --save: do not segfaultThis is an addition to commit ea64ee6b9. It fixes segfault in store_dev() when --devices option was used. Signed-off-by: Kir Kolyshkin <kir@openvz.org> | |||
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> |