Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Jan 22, 2012

  1. Kirill Kolyshkin

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

    ... 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>
    authored January 22, 2012

Jan 17, 2012

  1. Kirill Kolyshkin

    Fix weirdness on vzctl enter

    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>
    authored January 18, 2012
  2. Kirill Kolyshkin

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

    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>
    authored January 17, 2012

Jan 14, 2012

  1. Kirill Kolyshkin

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

    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>
    authored January 14, 2012

Jan 13, 2012

  1. Kirill Kolyshkin

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

    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>
    authored January 14, 2012
  2. Kirill Kolyshkin

    vps-download: fix CHECK_TEMPLATE_SIG check

    It's just a typo, which unfortunately renders gpg_working() unusable.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored January 14, 2012

Jan 12, 2012

  1. Kirill Kolyshkin

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

    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>
    authored January 12, 2012

Jan 11, 2012

  1. Kirill Kolyshkin

    Released vzctl-3.0.30

    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>
    authored January 10, 2012
  2. Kirill Kolyshkin

    man/vzlist.8: fixed typo

    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored January 11, 2012
  3. Kirill Kolyshkin

    vzlist: error message fixes

    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>
    authored January 11, 2012
  4. Kirill Kolyshkin

    vzlist: add CPUS field (-o cpus)

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

    vzlist: refactor get_ve_cpustat()

    Simplify and streamline
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored January 11, 2012

Dec 30, 2011

  1. Kirill Kolyshkin

    Rework CT umount

    * 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>
    authored December 31, 2011

Dec 29, 2011

  1. Kirill Kolyshkin

    vzlist: use a macro to save a few lines

    ... and decrease the possibility of a typo.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored December 29, 2011

Dec 28, 2011

  1. Kirill Kolyshkin

    vzcfgvalidate: add -v yes|no option

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

    vzcfgvalidate: fix exit code in case validation failed

    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>
    authored December 28, 2011
  3. Kirill Kolyshkin

    vzcfgvalidate: refactor usage()

    Should have no visible effect.
    
    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored December 28, 2011
  4. Kirill Kolyshkin

    vzcfgvalidate: add support for vswap configs

    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>
    authored December 28, 2011
  5. Kirill Kolyshkin

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

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

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

    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>
    authored December 28, 2011

Dec 27, 2011

  1. Kirill Kolyshkin

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

    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>
    authored December 27, 2011
  2. Kirill Kolyshkin

    src/lib/script.c: eliminate a warning

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

    vzctl set: fix bogus error from parse_vswap()

    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored December 27, 2011
  4. Kirill Kolyshkin

    vzctl set: introduce --ram and --swap

    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>
    authored December 27, 2011
  5. Kirill Kolyshkin

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

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

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

    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored December 27, 2011
  7. Kirill Kolyshkin

    man/vzctl.8: better info wrt VSwap

    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>
    authored December 27, 2011

Dec 23, 2011

  1. Kirill Kolyshkin

    etc/conf/*vswap*: simplify

    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>
    authored December 23, 2011
  2. Kirill Kolyshkin

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

    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>
    authored December 23, 2011
  3. Kirill Kolyshkin

    vzsplit: remove hacks for KMEMSIZE, DCACHESIZE, LOCKEDPAGES

    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>
    authored December 23, 2011
  4. Kirill Kolyshkin

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

    "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>
    authored December 23, 2011
  5. Kirill Kolyshkin

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

    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>
    authored December 23, 2011
  6. Kirill Kolyshkin

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

    …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>
    authored December 23, 2011

Dec 09, 2011

  1. Kirill Kolyshkin

    scripts/vps-download: add config file

    Signed-off-by: Kir Kolyshkin <kir@openvz.org>
    authored December 09, 2011

Dec 01, 2011

  1. Kirill Kolyshkin

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

    (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>
    authored December 01, 2011
Something went wrong with that request. Please try again.