[lxc-devel] [lxc/lxc] 2a51cd: Discontinue the use of in-line comments (stable)

GitHub noreply at github.com
Sat Sep 20 01:22:15 UTC 2014


  Branch: refs/heads/stable-1.0
  Home:   https://github.com/lxc/lxc
  Commit: 2a51cda97be376aa956b0c770b9f11afe0d4562d
      https://github.com/lxc/lxc/commit/2a51cda97be376aa956b0c770b9f11afe0d4562d
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M config/templates/centos.common.conf.in
    M config/templates/fedora.common.conf.in
    M config/templates/oracle.common.conf.in

  Log Message:
  -----------
  Discontinue the use of in-line comments (stable)

Those aren't supported, it's just a lucky coincidence that they weren't
causing problems.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 4dd8d0621a5554da7f49a187faa1fbf7f53d14ca
      https://github.com/lxc/lxc/commit/4dd8d0621a5554da7f49a187faa1fbf7f53d14ca
  Author: KATOH Yasufumi <karma at jazz.email.ne.jp>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M doc/ja/lxc-snapshot.sgml.in
    M doc/lxc-snapshot.sgml.in

  Log Message:
  -----------
  doc: Add destroy option to lxc-snapshot(1)

This commit is the same as the commit 18aa217 and 99e616a on master
branch, except "ALL" keyword.

Signed-off-by: KATOH Yasufumi <karma at jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 408d0479f33f5fc1107fa88040fd84ddb0209fbc
      https://github.com/lxc/lxc/commit/408d0479f33f5fc1107fa88040fd84ddb0209fbc
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  command socket: use hash if needed

The container command socket is an abstract unix socket containing
the lxcpath and container name.  Those can be too long.  In that case,
use the hash of the lxcpath and lxcname.  Continue to use the path and
name if possible to avoid any back compat issues.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 154ba520ab6274725c5b75561e3fd552a831bc80
      https://github.com/lxc/lxc/commit/154ba520ab6274725c5b75561e3fd552a831bc80
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/monitor.c

  Log Message:
  -----------
  monitor: fix sockname calculation for long lxcpaths

A long enough lxcpath (and small PATH_MAX through crappy defines) can cause
the creation of the string to be hashed to fail.  So just use alloca to
get the size string we need.

More importantly, while I can't explain it, if lxcpath is too long, setting
sockname[sizeof(addr->sun_path)-2] to \0 simply doesn't seem to work.  So set
sockname[sizeof(addr->sun_path)-3] to \0, which does work.

With this, and with

lxc.lxcpath = /opt/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789/lxc0123456789

in /etc/lxc/lxc.conf, I can run lxc-wait just fine.  Without it, it fails
(as does lxc-start -d, which uses lxc_wait to verify the container started)

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 18d27b5b9fc40fe56839829fa8081530277686ab
      https://github.com/lxc/lxc/commit/18d27b5b9fc40fe56839829fa8081530277686ab
  Author: TAMUKI Shoichi <tamuki at linet.gr.jp>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M templates/lxc-plamo.in

  Log Message:
  -----------
  Update plamo template

- If "installpkg" command does not exist, lxc-plamo temporarily
  install the command with static linked tar command into the lxc
  cache directory.  The tar command does not refer to passwd/group
  files, which means that only a few files/directories are extracted
  with wrong user/group ownership.  To avoid this, the installpkg
  command now uses the standard tar command in the system.
- Change mode to 666 for $rootfs/dev/null to allow write access for
  all users.
- Small fix in usage message.

Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: KATOH Yasufumi <karma at jazz.email.ne.jp>


  Commit: 2b96d9f6d73382bf3a03de180763f5ad1de819a1
      https://github.com/lxc/lxc/commit/2b96d9f6d73382bf3a03de180763f5ad1de819a1
  Author: S.Çağlar Onur <caglar at 10ur.org>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/bdev.c

  Log Message:
  -----------
  show additional info if btrfs subvolume deletion fails (issue #315)

Unprivileged users require "-o user_subvol_rm_allowed" mount option for btrfs.
Make the INFO level message to ERROR to make it clear, which now says following;

[caglar at qop:~] lxc-destroy -n rubik
lxc_container: Is the rootfs mounted with -o user_subvol_rm_allowed?
lxc_container: Error destroying rootfs for rubik
Destroying rubik failed

Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 435e1b8784d78ce0f10a6a6bde3088af0ac769d3
      https://github.com/lxc/lxc/commit/435e1b8784d78ce0f10a6a6bde3088af0ac769d3
  Author: S.Çağlar Onur <caglar at 10ur.org>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/attach.c

  Log Message:
  -----------
  ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313

Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 7b188fe5a2693f27a76fcc2d5a69fb134f3aee76
      https://github.com/lxc/lxc/commit/7b188fe5a2693f27a76fcc2d5a69fb134f3aee76
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  chmod container dir to 0770 (v2)

This prevents u2 from going into /home/u1/.local/share/lxc/u1/rootfs
and running setuid-root applications to get write access to u1's
container rootfs.

v2: set umask to 002 for the mkdir.  Otherwise if umask happens to be,
say, 022, then user does not have write permissions under the container
dir and creation of $containerdir/partial file will fail.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 90dca54e539e0ebe193f2da03cc84129ecce9b59
      https://github.com/lxc/lxc/commit/90dca54e539e0ebe193f2da03cc84129ecce9b59
  Author: Daniel Miranda <danielkza2 at gmail.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M config/etc/Makefile.am
    M configure.ac
    M src/lua-lxc/Makefile.am
    M src/python-lxc/Makefile.am
    R src/python-lxc/setup.py
    A src/python-lxc/setup.py.in

  Log Message:
  -----------
  build: Fix support for split build and source dirs

Building LXC in a separate target directory, by running configure from
outside the source tree, failed with multiple errors, mostly in the
Python and Lua extensions, due to assuming the source dir and build dir
are the same in a few places. To fix that:

- Pre-process setup.py with the appropriate directories at configure
  time
- Introduce the build dir as an include path in the Lua Makefile
- Link the default container configuration file from the alternatives
  in the configure stage, instead of setting a variable and using it
  in the Makefile

Signed-off-by: Daniel Miranda <danielkza2 at gmail.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: f5121eae23a79455436413e71b7e9d4eebb69bd8
      https://github.com/lxc/lxc/commit/f5121eae23a79455436413e71b7e9d4eebb69bd8
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  mount_entry: use statvfs

Use statvfs instead of parsing /proc/self/mountinfo to check for the
flags we need to and into the msbind mount flags.  This will be faster
and the code is cleaner.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 57518f5369bb986fbd6641edf953fda3f46170c9
      https://github.com/lxc/lxc/commit/57518f5369bb986fbd6641edf953fda3f46170c9
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/conf.c

  Log Message:
  -----------
  lxc_mount_auto_mounts: honor existing nodev etc at remounts

Same problem as we had with mount_entry().  lxc_mount_auto_mounts()
sometimes does bind mount followed by remount to change options.
With recent kernels it must pass any preexisting NODEV/NOSUID/etc
flags.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 4791b80e2fe63c6eb8f40eda0d3f58ec24dcc486
      https://github.com/lxc/lxc/commit/4791b80e2fe63c6eb8f40eda0d3f58ec24dcc486
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M configure.ac
    M src/lxc/conf.c

  Log Message:
  -----------
  statvfs: do nothing if statvfs does not exist (android/bionic)

If statvfs does not exist, then don't recalculate mount flags
at remount.

If someone does need this, they could replace the code (only
if !HAVE_STATVFS) with code parsing /proc/self/mountinfo (which
exists in the recent git history)

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 71cb2a0dde282994f4d2f8b84b6aa4684c4717df
      https://github.com/lxc/lxc/commit/71cb2a0dde282994f4d2f8b84b6aa4684c4717df
  Author: Denis Pynkin <denis_pynkin at epam.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M templates/lxc-altlinux.in

  Log Message:
  -----------
  Additional checks in ALTLinux template

Added check of services in container before start or stop.
Added check of syslog config existence prior changing.

Signed-off-by: Denis Pynkin <dans at altlinux.org>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: cd37ec2773ffc98924b63da1b326b9b57771a9fe
      https://github.com/lxc/lxc/commit/cd37ec2773ffc98924b63da1b326b9b57771a9fe
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxc_user_nic.c

  Log Message:
  -----------
  Prevent compiler warning by initializing ifindex

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: 43d8085d427baea48fd79a2768ce29ade89bb837
      https://github.com/lxc/lxc/commit/43d8085d427baea48fd79a2768ce29ade89bb837
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/tests/lxc-test-unpriv
    M src/tests/lxc-test-usernic.in

  Log Message:
  -----------
  tests: Copy the download cache when available [v2]

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: ff117dabd52fd19d18a4bcfd2b578e4663e6794e
      https://github.com/lxc/lxc/commit/ff117dabd52fd19d18a4bcfd2b578e4663e6794e
  Author: Daniel Miranda <danielkza2 at gmail.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M config/etc/Makefile.am

  Log Message:
  -----------
  build: don't remove configuration template on clean

Now that default.conf is generated/linked during the configuration
phase, it should not longer be removed in the 'clean' stage, or
subsequent builds will fail. Only remove it during 'dist-clean'.

Signed-off-by: Daniel Miranda <danielkza2 at gmail.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: f3116a832d75954d9c98d7f289b098a84b85c2f4
      https://github.com/lxc/lxc/commit/f3116a832d75954d9c98d7f289b098a84b85c2f4
  Author: Daniel Miranda <danielkza2 at gmail.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/python-lxc/setup.py.in

  Log Message:
  -----------
  build: Make setup.py run from srcdir to avoid distutils errors

distutils can't handle paths to source files containing '..'. It will
try to navigate away from the build directory and fail. To fix that,
before building the python module, transform all the path variables then
cd to the srcdir, and set the build directory manually.

This is hopefully the last needed fix to use separate build and
source diretories.

Signed-off-by: Daniel Miranda <danielkza2 at gmail.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: b656b42a4db9ee440d8f4dc80a717363a93b4da3
      https://github.com/lxc/lxc/commit/b656b42a4db9ee440d8f4dc80a717363a93b4da3
  Author: S.Çağlar Onur <caglar at 10ur.org>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/commands.c
    M src/lxc/commands.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  handle hashed command socket names (v2)

With the new hashed command socket names (e85898415c), it's possible to
have something like below;

[caglar at qop:~/go/src/github.com/lxc/go-lxc(master)] cat /proc/net/unix | grep lxc
0000000000000000: 00000002 00000000 00010000 0001 01 53465 @lxc/d086e835c86f4b8d/command
[...]

list_active_containers reads /proc/net/unix to find all running
containers but this new format no longer includes the container name or
its lxcpath.

This patch introduces two new commands (LXC_CMD_GET_NAME and
LXC_CMD_GET_LXCPATH) and starts to use those in list_active_containers
call.

changes since v1:
 - added sanity check proposed by Serge

Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>


  Commit: b464fc80f74b2d63eb84bb4b065034c0113ebd64
      https://github.com/lxc/lxc/commit/b464fc80f74b2d63eb84bb4b065034c0113ebd64
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/cgmanager.c

  Log Message:
  -----------
  lxc-cgm: fix issue with nested chowning

To ask cgmanager to chown files as an unpriv user, we must send the
request from the container's namespace (with our own userid also
mapped in).  However when we create a new namespace then we must
open a new dbus connection, so that our credential and the credential
on the dbus socket match.  Otherwise the proxy will refuse the request.

Because we were warning about this failure but not exiting, the failure
was not noticed until the unprivileged container went on to try to
administer its cgroups, i.e. creating a container inside itself.

Fix this by having the do_chown_cgroup create a new cgmanager connection.
In order to reduce the number of connections, since the list of subsystems
is global anyway, don't call do_chown_cgroup once for each controller,
just call it once and have it run over all controllers.

(This patch does not change the fact that we don't fail if the
chown failed.  I think we should change that, but let's do it in a
later patch)

Reported-by: Stéphane Graber <stgraber at ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 3195a44ff0b42cdbd79220396e14ab3b5323e68e
      https://github.com/lxc/lxc/commit/3195a44ff0b42cdbd79220396e14ab3b5323e68e
  Author: Jean-Tiare LE BIGOT <jean-tiare.le-bigot at ovh.net>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/lxc_monitor.c
    M src/lxc/monitor.c
    M src/lxc/monitor.h
    M src/lxc/start.c

  Log Message:
  -----------
  Report container exit status to monitord

When managing containers, I need to take action based on container
exit status. For instance, if it exited abnormally (status!=0), I
sometime want to respawn it automatically. Or, when invoking
`lxc-stop` I want to know if it terminated gracefully (ie on `SIGTERM`)
or on `SIGKILL` after a timeout.

This patch adds a new message type `lxc_msg_exit_code,` to preserve
ABI. It sends the raw status code as returned by `waitpid` so that
listening application may want to apply `WEXITSTATUS` before. This is
what `lxc-monitor` does.

Signed-off-by: Jean-Tiare LE BIGOT <jean-tiare.le-bigot at ovh.net>


  Commit: 634d8bb6ec5d4063438d4137a422ea098c89d5c2
      https://github.com/lxc/lxc/commit/634d8bb6ec5d4063438d4137a422ea098c89d5c2
  Author: TAMUKI Shoichi <tamuki at linet.gr.jp>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M templates/lxc-plamo.in

  Log Message:
  -----------
  lxc-plamo: keep original uid/gid of files/dirs when installing

Regardless of whether "installpkg" command exists or not, install the
command temporarily with static linked tar command into the lxc cache
directory to keep the original uid/gid of files/directories.  Also,
use sed command instead of ed command for simplicity.

Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 6d0bd79370f7d5758173f8928ae5599b0f9dc0d2
      https://github.com/lxc/lxc/commit/6d0bd79370f7d5758173f8928ae5599b0f9dc0d2
  Author: TAMUKI Shoichi <tamuki at linet.gr.jp>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M templates/lxc-gentoo.in

  Log Message:
  -----------
  lxc-gentoo: keep original uid/gid of files/dirs when installing

Call tar with --numeric-owner option to use numbers for user/group
names because the whole uid/gid in rootfs should be consistently
unchanged as in original stage3 tarball and private portage.

Signed-off-by: TAMUKI Shoichi <tamuki at linet.gr.jp>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 69a8b71ba5b8900d5b8a1784061c72f995acacb6
      https://github.com/lxc/lxc/commit/69a8b71ba5b8900d5b8a1784061c72f995acacb6
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/cgmanager.c

  Log Message:
  -----------
  support use of 'all' containers when cgmanager supports it

Introduce a new list of controllers just containing "all".

Make the lists of controllers null-terminated.

If the cgmanager api version is high enough, use the 'all' controller
rather than walking all controllers, which should greatly reduce the
amount of dbus overhead.  This will be especially important for
those going through a cgproxy.

Also remove the call to cleanup cgroups when a cgroup existed.  That
usually fails (and failure is ignored) since the to-be-cleaned-up
cgroup is busy, but we shouldn't even be trying.  Note this can
create for extra un-cleanedup cgroups, however it's better than us
accidentally removing a cgroup that someone else had created and was
about to use.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>


  Commit: 70d371fe392afe7ef522911b08ec416d5fae01ce
      https://github.com/lxc/lxc/commit/70d371fe392afe7ef522911b08ec416d5fae01ce
  Author: William Dauchy <william at gandi.net>
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
    M src/lxc/log.c

  Log Message:
  -----------
  log: fix quiet mode

quiet mode was overriden by the double call of lxc_log_init
see lxc_container_new

use lxc_log_options_no_override in order to fix this

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Signed-off-by: William Dauchy <william at gandi.net>


Compare: https://github.com/lxc/lxc/compare/62bc64f3e481...70d371fe392a


More information about the lxc-devel mailing list