Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Commits on Jan 22, 2012
  1. @kolyshkin

    vzlist: do not exit with 1 if there are no CTs

    kolyshkin authored
    ... unless a user have specified CTID(s) explicitly.
    
    http://bugzilla.openvz.org/2149
    
    Reported-by: Ilja Livenson <lja.livenson@gmail.com>
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Jan 17, 2012
  1. @kolyshkin

    Fix weirdness on vzctl enter

    kolyshkin authored
    Commit 58c0659 added logging for vzctl exec and vzctl enter.
    Unfortunately it also added a bug: possible errors after vzctl enter
    go into shell input, like this:
    
    	# vzctl enter 248
    	entered into CT 248
    	xxxxx:/# 2012-01-17T13:25:20+0100 vzctl : CT 248 : Open /dev/pts/0
    	-bash: 2012-01-17T13:25:20+0100: command not found
    
    http://bugzilla.openvz.org/2139
    http://bugzilla.openvz.org/2146
    
    The fix is to set log file fd to NULL before entering (as it was before
    the above mentioned commit).
    
    Reported-by: Marc Perkel <marc@perkel.com>
    Reported-by: Michal Grzedzicki <lazy@iq.pl>
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  2. @kolyshkin

    Make the "Failed to set up upstart" message more verbose.

    kolyshkin authored
    Add a hint to install upstart to the CT.
    
    http://bugzilla.openvz.org/2140
    
    Reported-by: Marc Perkel <marc@perkel.com>
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Jan 14, 2012
  1. @kolyshkin

    etc/dists/scripts/gentoo-add_ip.sh: do not set up venet0 if no IPs

    kolyshkin authored
    If you configure a CT to only use veth interfaces (no IP addresses are
    configured for venet), gentoo-add_ip.sh still adds net.venet0 to the
    defalt runlevel and sets default route via venet0.
    
    Solution is not to run init_netconfig() on CT start if there are no IPs,
    but it creates a problem of adding first IP address to a running container --
    in this case routing for venet0 is not configured. This problem is fixed
    by using "have_ips && venet_configured || set_config" for running CT.
    
    http://bugzilla.openvz.org/2077
    
    Reported-by: Frank Wassmuth <frank@wassmuth.it>
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Jan 13, 2012
  1. @kolyshkin

    vzctl start: fix starting non-vswap CT migrated from old 32-bit host

    kolyshkin authored
    This is a dirty hack required for non-vswap CT configs produced by
    vzctl < 3.0.29 on a 32-bit host which then were used on a 64-bit host.
    Without it, one gets this error trying to start such a CT:
    
    	# vzctl start $VEID
    	Error: required UB parameter swappages not set
    
    This happens because CT config contains the following line:
    
    	PHYSPAGES="0:2147483647"
    
    and vzctl treats this config as vswap enabled.
    
    The initial problem is LONG_MAX is different on 32 bit and 64 bit hosts
    (equal to 2147483647 and 9223372036854775807, respectively). So when we
    migrate the container from 32 bit to 64 bit system, the 32 bit LONG_MAX
    value which was treated as unlimited is now not treated in a special way.
    
    This problem was addressed sequentially, here are a few bits of history.
    
    1. Since vzctl-3.0.19 (commit 635f13e) one can specify the word 'unlimited'
    instead of a numeric value.
    
    2. Since vzctl-3.0.26 (commit 3866be1) the sample configs are using this,
    so they have PHYSPAGES="0:unlimited".
    
    3. Since vzctl-3.0.29 (commit acaf07f) the value of LONG_MAX is saved
    to CT config as 'unlimited'.
    
    Now consider the following scenario:
    1. We have 32-bit host with vzctl < 3.0.29 and CT config having line
    	PHYSPAGES="0:2147483647"
    
    2. We migrate this container to 64 bit host with vzctl-3.0.30.
    
    3. We try to start this container.
    
    vzctl thinks that this is vswap-enabled config, complains about absent
    swappages parameter and fails to start CT.
    
    The fix is to modify is_vswap_config() to treat 32-bit LONG_MAX (== INT_MAX)
    as unlimited.
    
    Fixes http://bugzilla.openvz.org/2138
    
    Reported-by: Sergey Turchaninov <Sadistt0@gmail.com>
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  2. @kolyshkin

    vps-download: fix CHECK_TEMPLATE_SIG check

    kolyshkin authored
    It's just a typo, which unfortunately renders gpg_working() unusable.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Jan 12, 2012
  1. @kolyshkin

    cap.c: if capset fails, retry with old default

    kolyshkin authored
    Apparently RHEL5 kernel doesn't like CAP_SETPCAP being set.
    It was added to default set in commit 4721d0e and released
    in vzctl-3.0.30, which doesn't work with RHEL5 kernel (CT is
    not started).
    
    The solution is to silently retry without this capability, assuming
    the problem is the old kernel.
    
    While at it
    * remove SETFCAP (added by commit f319aef) from the "old" set
    * untangle the brackets madness messed up in commit f319aef
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Jan 11, 2012
  1. @kolyshkin

    Released vzctl-3.0.30

    kolyshkin authored
    CHANGES
    (since vzctl 3.0.29.3)
    
    New features
    * vzctl create: add ability to auto-download template cache
    * vzctl set: introduce --ram and --swap options
    * vzcfgvalidate: add support for VSwap configs (#1969)
    
    Fixes
    * vzctl umount: try to umount all submounts first, do not use detached umount
    * vzcfgvalidate: fix exit code in case validation failed (should be 2)
    * vzctl set --userpasswd: fix changing pass on a stopped CT for new distros
    * vzctl: skip setting meminfo on a vswap-enabled CT
    * vzctl set --ipadd: fix default IPv6 route for Debian (#2023)
    * vzlist: fixed messages wrt stdout/stderr
    * etc/dists/scripts/debian-del_ip.sh: fix removing too much IPv6 addresses
    * etc/dists/scripts/debian-del_ip.sh: try harder to remove all IPs
    
    Improvements
    * vzctl: in VSwap mode, make most of UBC parameters optional
    * etc/conf/*: simplify VSwap configs by removing optional parameters
    * vzmigrate: use --sparse on the first rsync (#2002)
    * vzctl enter/exec: log these actions (#1266)
    * vzcfgvalidate: add -v yes|no option
    * vzlist: add 'cpus' field
    * vzctl set --ipdel all: do not run *add_ip.sh script
    * etc/dists/scripts/*-del_ip.sh: add case for IPDELALL
    * vzctl set --save: enhance the "config saved" message
    * vzctl set: tailor "no save" warning to running/stopped states
    * vzsplit: remove hacks for KMEMSIZE, DCACHESIZE, LOCKEDPAGES
    * vzctl start: add SETPCAP and AUDIT_WRITE capabilities to default set
    * vzctl create: set proper file caps for Fedora >= 15
    * etc/conf: add VSwap configs for 2GB and 4GB RAM
    * etc/conf/ve-vswap-1g.conf-sample: added as an alias to 1024m
    * Various code cleanups and refactoring
    
    Documentation
    * man/vzctl.8: better info wrt VSwap
    * Describe the new options
    * Small formatting fixes
    
    THANKS
    
    OpenVZ project would like to thank the following people who contributed
    patches and/or provided bug reports for this vzctl release
    (in no particular order):
    
    * John O. Stevens
    * Scott Dowdle
    * Toke Høiland-Jørgensen
    * Stefan Priebe
    * FabioDB
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  2. @kolyshkin

    man/vzlist.8: fixed typo

    kolyshkin authored
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  3. @kolyshkin

    vzlist: error message fixes

    kolyshkin authored
    1. Print errors to stderr
    2. Print normal messages (such as usage) to stdout
    2. If we can't open a file, print why
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  4. @kolyshkin

    vzlist: add CPUS field (-o cpus)

    kolyshkin authored
    http://bugzilla.openvz.org/2059
    
    Reported-by: Todd Mueller <toddmueller@gmail.com>
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  5. @kolyshkin

    vzlist: refactor get_ve_cpustat()

    kolyshkin authored
    Simplify and streamline
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 30, 2011
  1. @kolyshkin

    Rework CT umount

    kolyshkin authored
    * Try to umount all submounts
    * Do not use detached umount
    
    Should fix some cases with bind mounts,
    possibly some vzquota off failures.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 29, 2011
  1. @kolyshkin

    vzlist: use a macro to save a few lines

    kolyshkin authored
    ... and decrease the possibility of a typo.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 28, 2011
  1. @kolyshkin

    vzcfgvalidate: add -v yes|no option

    kolyshkin authored
    This is to override automatic detection of vswap config
    when doing validation.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  2. @kolyshkin

    vzcfgvalidate: fix exit code in case validation failed

    kolyshkin authored
    vzcfgvalidate(8) manual page says exit code of 2 is expected
    in case configuration is invalid.
    
    Commit 95b0f03 accidentally broke that functionality, but even
    before it the exit code in this case was 1 not 2.
    
    Fix the behavior to comply with the man page.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  3. @kolyshkin

    vzcfgvalidate: refactor usage()

    kolyshkin authored
    Should have no visible effect.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  4. @kolyshkin

    vzcfgvalidate: add support for vswap configs

    kolyshkin authored
    For vswap config, these checks are performed:
    1. only check physpages and swappages
    2. barrier should be zero for both
    3. physpages.limit should not exceed host RAM
    4. swappages.limit should not exceed host swap
    
    Everything else we just ignore.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  5. @kolyshkin

    vzctl set --save: enhance the "config saved" message

    kolyshkin authored
    - change the text to be more clear
    - omit CT id
    - add config file name
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  6. @kolyshkin

    vzctl set: tailor "no save" warning to running/stopped states

    kolyshkin authored
    Before this patch, the warning printed in case no --save
    flag is supplied to vzctl set command looked like this:
    
    WARNING: Settings were not saved and will be reset to original values at the next start (use --save flag)
    
    Obviously, the 'and will be reset to original values at the next start'
    part only makes sense if the container is running. So make this part
    conditional.
    
    While at it, rephrase the warning a bit.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 27, 2011
  1. @kolyshkin

    vzctl start: in VSwap mode, set unset UBC params to unlimited

    kolyshkin authored
    Contrary to what kernel guys said, in-kernel defaults are not sane
    and we should not rely on those. Just set the unset UBC parameters
    to unlimited.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  2. @kolyshkin

    src/lib/script.c: eliminate a warning

    kolyshkin authored
    This one: warning: ignoring return value of 'write', declared with attribute warn_unused_result
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  3. @kolyshkin

    vzctl set: fix bogus error from parse_vswap()

    kolyshkin authored
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  4. @kolyshkin

    vzctl set: introduce --ram and --swap

    kolyshkin authored
    These are just an easy aliases for --physpages and --swappages,
    the differences being:
    
    1. There is a single argument -- the limit (the barrier is set to 0).
    2. The argument is in bytes (with optional K/M/G/T suffix).
    
    While at it, document PHYSPAGES and SWAPPAGES in ctid.conf(5).
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  5. @kolyshkin

    src/lib/config.c: eliminate unneeded var in parse_ub()

    kolyshkin authored
    We do not use conf anywhere, so let's skip the assignment.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  6. @kolyshkin

    man/vzctl.8: format devnodes example using .EX/.EE

    kolyshkin authored
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  7. @kolyshkin

    man/vzctl.8: better info wrt VSwap

    kolyshkin authored
    The meaning of --physpages, --swappages and --meminfo parameters
    are different for VSwap-enabled and old kernels. Clearly describe
    it.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 23, 2011
  1. @kolyshkin

    etc/conf/*vswap*: simplify

    kolyshkin authored
    We can only leave PHYSPAGES and SWAPPAGES, and throw away others.
    Note that they can still be set, but it's not obligatory anymore.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  2. @kolyshkin

    vzctl: in VSwap mode, make most of UBC params optional

    kolyshkin authored
    In vswap mode (if physpages.limit is not unlimited) we only require
    physpages and swappages, others are now really optional and can
    be left unset.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  3. @kolyshkin

    vzsplit: remove hacks for KMEMSIZE, DCACHESIZE, LOCKEDPAGES

    kolyshkin authored
    Since kernel 042stab042 there is no longer need to tweak
    kmemsize, dcachesize and lockedpages anymore. For more details,
    check http://blog.openvz.org/39644.html
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  4. @kolyshkin

    src/lib/cpt.c: fix log level of an error message

    kolyshkin authored
    "Container is not running" is an error message and should be
    handled with severity of -1 not 0.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  5. @kolyshkin

    src/lib/ub.c: fix loglevel for non-error message

    kolyshkin authored
    A message "UB limits set succesfully" is not an error and
    should be handled with priority of 0 not -1.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
  6. @kolyshkin

    dists/scripts/set_userpass.sh: fix changing pass on a stopped CT for …

    kolyshkin authored
    …new distros
    
    vzctl fails to change password in stopped container with opensuse-12.1:
    
    Container is mounted
    Changing password for test111.
    Can't open /dev/urandom for reading: No such file or directory
    Cannot create salt: No such file or directorychpasswd: errors occurred, 1 passwords not updated
    Container is unmounted
    
    This happens due to devtmpfs on /dev feature used by suse-12.1 templates,
    so we create /dev/urandom manually.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 9, 2011
  1. @kolyshkin

    scripts/vps-download: add config file

    kolyshkin authored
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Commits on Dec 1, 2011
  1. @kolyshkin

    scripts/vps-download: gpg checking, template updating added

    kolyshkin authored
    (1) Add automatic GPG signature checking, enabled by default.
    
    (2) Add ability to download a newer template, enabled by default.
    
    (3) Add --no-gpg-check and --no-update to disable (1) and (2)
    
    (4) Add usage() and --usage o show some help.
    
    (5) Add --config to show current configuration (including hints on how
        to modify it using parameters in vz.conf)
    
    (6) Add sanity check for gpg binary and gpg key presence.
    
    (7) Simplify download() by splitting out do_download().
    
    (8) Something else I forgot.
    
    TODO:
    1. Add --no-gpg-check, --no-download and --no-update to 'vzctl create'.
    2. Add call to vps-download even if there is a template cache
       (unless --no-update or --no-download is given).
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Something went wrong with that request. Please try again.