bin/vznetaddbr.in: fix to work with bash >= 3.2bin/vznetaddbr.in: fix to work with bash >= 3.2
Bash-3.2 changed the behavior of the [[ command's `=~' operator when the
right-hand side was quoted: it matched the quoted portions as strings.
vzcfgvalidate: improve readability of some messagesError: tcpsndbuf.lim-tcpsndbuf.bar should be > 768000 (currently, 1000)
Error: othersockbuf.lim-othersockbuf.bar should be > 409600 (currently, 40000)
Warning: tcprcvbuf.lim-tcprcvbuf.bar should be > 768000 (currently, 1000)
When people get such message it is not clear that (tcpsndbuf.lim-tcpsndbuf.bar)
means difference between tcpsndbuf.lim and tcpsndbuf.bar.
tirukkil proposed (http://forum....
vzctl: make dists/scripts/gentoo* openrc compatibleIn gentoo there is new init system: openrc. Patch supplied makes vzctl gentoo
scripts workable both with old baselayout-1.x (which included init sytem) and
newer openrc.
But notice: this patch modifies network setup. Now instead of using FAKEGATEWAY
I use just "default dev venet0". I've tried to describe situation and ask
question here:
http://forum.openvz.org/index.php?t=msg&goto=32775
http:/...
vzctl: doesn't start in runlevel 4 (by LSB headers)The startup script /etc/init.d/vz is not executed in runlevel 4. It is a
common practice on Debian to start the services in runlevels 2345 and
stop it in runlevels 016. This patch should be enough.
http://bugs.debian.org/493206
vzctl, vzlist: implement --description optionImplementation of --description option
http://bugzilla.openvz.org/311
[kir@openvz.org: use strdup(); man pages changes]
vzctl usage output for --netif bridge parameterCommit a16e0ecf72d4f2c7bd08aadbaa8272cbdc9e25a5 also need vzctl usage
output to be changed. Implement it.
/etc/init.d/vz: get rid of confusing error from echoSometimes /etc/init.d/vz (re)start can spit this error:
/etc/init.d/vz: line 200: echo: write error: Broken pipe
Here is the code around line 200:
conf="`zcat /proc/config.gz 2>/dev/null | grep -E -v '^#|^$'`"
for opt in $opt_must; do
if ! echo "${conf}" | grep -q "${opt}="; then # <-- LINE 200
The problem here is grep -q exits immediately when it finds the first match,
s...
vzctl.spec: add forgotten vznetaddbr scriptThis is an addition to commit 41fb6973bc205c00e25ba73431110ac8e821d6c9
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
src/lib/exec.c: simplify code for using default environmentWas doing that in three places; just do it once.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
vzctl create: fix loosing CT config fileIn case --config option is specified to vzctl create, CT config file
is overwritten with the specified one. First, this is plainly wrong --
if CT config exists, it should be preserved. Second, there is (at least)
one scenario when CT config can be lost (see OpenVZ bug #775) because of
such behaviour.
So, just bail out with error if using --config option and CT config already
exists.
http://bu...
vzlist: fix "not found" messageIn case CTID is explicitly specified on the command line,
info about one particular container is expected, thus the
error message "Containers not found" looks a bit strange.
Change it to "Container(s) not found" which suits all cases.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Rework modification of container's /etc/hostsThere are actually multiple problems with the original (as shipped with
vzctl-3.0.22) awk script. I consider the most severe to be:
- discarding all user changes/additions after the "special comment line". This
is a serious problem for me, and probably to anyone using such automation
software as puppet. Puppet (and almost certainly other things as well) are
limited to just appending a line to ...
distribution.conf-template: better doc for SET_HOSTNAMEAdded some more info about this script as per comments in bug #939.
http://bugzilla.openvz.org/939
Reported-by: Marcin Owsiany <marcin@owsiany.pl>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Fix compilation against glibc-2.8.vzctl fails to build on Gentoo against glibc-2.8 with the following errors:
config.c: In function 'parse_ul_sfx':
config.c:530: error: 'LONG_MAX' undeclared (first use in this function)
config.c:530: error: (Each undeclared identifier is reported only once
config.c:530: error: for each function it appears in.)
config.c: In function 'parse_twoul_sfx':
config.c:558: error: 'LONG_MAX' undeclared ...
src/lib/ub.c: Fix typo in message after UB limits are setOriginal report by Daniel Hahler <openvz-bugs@thequod.de>
Fixes: http://bugzilla.openvz.org/943
Signed-off-by: David K <davidk@tektonic.net>
bash_completion: fix ls invocationAs Daniel Hahler reports in bug #944:
etc/bash_completion.d/vzctl.sh.in uses "ls" for "--ostemplate" and
"--config|--applyconfig".
This might cause strange behavior, if a funky alias for "ls" is defined,
e.g. some coloring etc.
Fix this by using bash built-in "command" which should not use alias.
http://bugzilla.openvz.org/944
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reported-...
More strict permissions for /vz/private and /vz/rootAs pointed out in bug #954 (and has been generally known for ages)
ordinary users in CT0 can access CT files having the same GIDs/UIDs.
This can be effectively prevented by using mode 700 for /vz/root
and /vz/private. It was already done so in vzctl.spec (for RPMs)
but not in "make install" target. Fix it here as well.
http://bugzilla.openvz.org/954
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Fix a typo in bash_completion script.This prevented completing CT names on stop/enter/exec commands.
http://bugzilla.openvz.org/show_bug.cgi?id=962
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479797
Fix 'vzctl --wait' to work with Fedora 9 and Ubuntu.There is a bug in commit 3223b438683eba695ecaff2be65d08cb231bb471
which makes the code look for /etc/inittab and fail. Fix it.
[kir@openvz.org: changelog; renamed event.d file, added a comment into it]
http://bugzilla.openvz.org/981
Fix 'vzctl start --wait' to work with DebianThe problem with Debian is that the default runlevel is 2 and INITTAB_ACTION
only specifies runlevels 3 and 5, it should specify 2, 3, 4, 5 the same
as it is done for upstart.
http://bugzilla.openvz.org/981
Add brigde parameter to --netif optionsIn Proxmox VE we want to support multiple bridges. I currently use
a patch which adds an bridge parameter to the netif options:
NETIF="ifname=XXX,bridge=XXX,mac=XXX,host_ifname=XXX,host_mac=XXX"
--netif_add ifname[,mac,host_ifname,host_mac,bridge]
I also modified --netif_add to accept empty parameters, for example:
--netif_add eth3,,,,vmbr3
vzctl: fix a compilation warning about capget()The following compilation warning occurs
after commit 0d6bfad92c7cb6a193801ce8dac3a0dc64396ca8:
cap.c: In function 'set_cap':
cap.c:168: warning: implicit declaration of function 'capget'
capget prototype is in sys/capability.h; however we can't include it
since sys/capability.h conflicts with linux/capability.h
Put capget() prototype directly into cap.c
Signed-off-by: Kir Kolyshkin <ki...
vzctl: supress a compilation warningThe following compilation warning occurs:
In file included from cap.c:28:
../../include/cap.h:26:1: warning: "CAP_TO_MASK" redefined
In file included from cap.c:25:
/usr/include/linux/capability.h:334:1: warning: this is the location of the previous definition
Indeed, CAP_TO_MASK is also defined in linux/capability.h. We can not rely
on that though so we #undef it and use our own versi...
vpsreboot: fix occasional error printingoccasionally and pretty annoying vpsreboot reports via cron:
cat: /var/lock/vereboot.lock: No such file or directory
obviously sometimes the LOCKFILE goes away so we do ignore even the situation
if cat fails - I have not yet any clue if there are bad sideffects coming up.
vzcfgvalidate: do not check disk quota params if disk quota is offIf DISK_QUOTA is set to "no" (globally or for this particular container)
do not check disk quota parameters or complain that they are absent.
Without this patch and quota disabled and no quota values
in container's config, the following errors occur:
$ vzcfgvalidate 201.conf
Error: parameter diskspace not found
Error: parameter diskinodes not found
http://bugzilla.openvz.org/833
Signe...
init.d/vz-redhat: improve kernel version extractionFrom http://bugzilla.openvz.org/834:
I'm using above mentioned package. When installing it I stumbled across
the following error message:
> Installing new version of config file /etc/vz/vz.conf ...
> /etc/init.d/vz: line 192: test: 18+openvz: integer expression expected
I'm using a self-compiled kernel with the following version number:
> # uname -r
> 2.6.18+openvz
When parsing the version...
etc/vz/vz.conf: document MODULES_DISABLEDOriginal report and patch by Peter <pva@gentoo.org>
Fixes http://bugzilla.openvz.org/888
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
man/vzlist.8: assorted fixes* Use bold for literals ("-")
* Use ... not ..
* Add "and their parameters" to DESCRIPTION
* In OPTIONS, use short name first, then a long one
* Add -o, --output description to OPTIONS
* Longer description of -n, --name
* Fix incorrect description of --name_filter option,
add reference to --hostname
* Remove angle brackets <> from "pattern" -- we have italic for that
* Add punctuation dots at...
vznetcfg: "source" sh statement doesn't work with debian dashI think that you missing to remove the source command when you convert to pure
Bourne shell script syntax. Perhaps you should use the dot.
I receive this error :
[..]
Configure veth devices: veth101.0
/usr/sbin/vznetcfg: 20: source: not found
VE start in progress...
http://bugzilla.openvz.org/894
[PATCH] vzctl: implement --mac_filter optionEnables/disables MAC address filtering for the container's veth device and
the possibility of configuring the MAC address of this device from inside
the container.
Patch based on previous work by Marat Stanichenko <mstanichenko@openvz.org>
Fix inability to start a containerContainer start could fail with the following message:
Unable to set capability: Invalid argument
It is caused by changed value of LINUX_CAPABILITY_VERSION
(defined in /usr/include/linux/capability.h).
The fix is to get this version from kernel (as libcap-2.0.0 does).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Fix vzctl start --wait on systems using upstartFor now the only system that uses upstart w/o init compatibility
mode is Fedora 9. Fix it.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Print to STDERR for unknown iptable module errorChange warning in parse_iptables() to send its output to STDERR
so it can be redirected elsewhere if necessary.
Signed-off-by: David K <davidk@tektonic.net>
Acked-by: Kir Kolyshkin <kir@openvz.org>
Compilation fixCommit 1f4c1f594687be2c0dab2970f5b6c7da697883c8 has a typo in code -- fix it.
Signed-off-by: David K <davidk@tektonic.net>
Acked-by: Kir Kolyshkin <kir@openvz.org>
per-distro config: fix documentationThe value of DISTRIBUTION is not honored, only OSTEMPLATE is used.
Fix the comment accordingly.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Support for udev static devices in containerWhen a device access is granted to a container, we create an appropriate
device file in container's /dev. The problem is /dev can be under tmpfs
and managed by udev, so device file disappears after container reboot.
The solution is to put the device file in /lib/udev/devices (or
/etc/udev/devices if previous doesn't exist). From there it will be copied
to new /dev on system boot.
Signed-off-b...