]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
9 years agolxc-attach: update and improve tests 885/head
Christian Brauner [Wed, 9 Mar 2016 14:44:05 +0000 (15:44 +0100)] 
lxc-attach: update and improve tests

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agochange version to 2.0.0.rc9 in configure.ac lxc-2.0.0.rc9
Stéphane Graber [Wed, 9 Mar 2016 08:02:58 +0000 (03:02 -0500)] 
change version to 2.0.0.rc9 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #884 from hallyn/2016-03-08/batch
Christian Brauner [Wed, 9 Mar 2016 07:53:03 +0000 (08:53 +0100)] 
Merge pull request #884 from hallyn/2016-03-08/batch

2016 03 08/batch

9 years agocgfsng: make sure a cgroup does not already exist 884/head
Serge Hallyn [Wed, 9 Mar 2016 07:34:19 +0000 (23:34 -0800)] 
cgfsng: make sure a cgroup does not already exist

Our mkdir_p ignore eexist, and of course we want that for
upper path components, but the final directory itself must
not already exist.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocgfsng: fix real bug and fake libc realloc bug
Serge Hallyn [Wed, 9 Mar 2016 07:04:46 +0000 (23:04 -0800)] 
cgfsng: fix real bug and fake libc realloc bug

read_file was using the wrong value for the string length.  Also,
realloc on i386 is wonky with small sizes - so use a batch size
to avoid small reallocs.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agochange version to 2.0.0.rc8 in configure.ac lxc-2.0.0.rc8
Stéphane Graber [Tue, 8 Mar 2016 22:39:34 +0000 (17:39 -0500)] 
change version to 2.0.0.rc8 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #883 from hallyn/2016-03-08/cgrouptests
Stéphane Graber [Tue, 8 Mar 2016 22:10:52 +0000 (17:10 -0500)] 
Merge pull request #883 from hallyn/2016-03-08/cgrouptests

tests: set clone_children if need be

9 years agotests: set clone_children if need be 883/head
Serge Hallyn [Tue, 8 Mar 2016 21:44:38 +0000 (13:44 -0800)] 
tests: set clone_children if need be

Lxc only sets it on /lxc, not on /.

It's conceivable that we should really re-set this to the original
value, to prevent making later tests not fail when they should.  I
didn't do that.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #882 from hallyn/2016-03-08/cgfsng.2
Christian Brauner [Tue, 8 Mar 2016 21:19:45 +0000 (22:19 +0100)] 
Merge pull request #882 from hallyn/2016-03-08/cgfsng.2

cgfsng: set cpuset clone_children if needed

9 years agocgfsng: set cpuset clone_children if needed 882/head
Serge Hallyn [Tue, 8 Mar 2016 18:49:16 +0000 (10:49 -0800)] 
cgfsng: set cpuset clone_children if needed

Sigh.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #881 from hallyn/2016-03-08/cgfsng.1
Stéphane Graber [Tue, 8 Mar 2016 17:04:41 +0000 (12:04 -0500)] 
Merge pull request #881 from hallyn/2016-03-08/cgfsng.1

cgfsng: enter/escape error msgs: differentiate and add errno

9 years agocgfsng: enter/escape error msgs: differentiate and add errno 881/head
Serge Hallyn [Tue, 8 Mar 2016 17:02:52 +0000 (09:02 -0800)] 
cgfsng: enter/escape error msgs: differentiate and add errno

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #880 from stgraber/master
Serge Hallyn [Tue, 8 Mar 2016 16:08:53 +0000 (08:08 -0800)] 
Merge pull request #880 from stgraber/master

Remove trailing newlines in log

9 years agoRemove trailing newlines in log 880/head
Stéphane Graber [Tue, 8 Mar 2016 14:50:53 +0000 (09:50 -0500)] 
Remove trailing newlines in log

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #879 from hallyn/2016-03-07/debug.aa
Stéphane Graber [Tue, 8 Mar 2016 03:13:24 +0000 (22:13 -0500)] 
Merge pull request #879 from hallyn/2016-03-07/debug.aa

prevent containers from reading /sys/kernel/debug

9 years agoprevent containers from reading /sys/kernel/debug 879/head
Serge Hallyn [Tue, 8 Mar 2016 03:10:58 +0000 (19:10 -0800)] 
prevent containers from reading /sys/kernel/debug

Unprivileged containers cannot read it anyway, but also prevent root
owned containers from doing so.  Sadly upstart's mountall won't run
if we try to prevent it from being mounted at all.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agochange version to 2.0.0.rc7 in configure.ac lxc-2.0.0.rc7
Stéphane Graber [Mon, 7 Mar 2016 23:47:50 +0000 (18:47 -0500)] 
change version to 2.0.0.rc7 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoFix dist tarball to include lxc-devsetup
Stéphane Graber [Mon, 7 Mar 2016 23:31:27 +0000 (18:31 -0500)] 
Fix dist tarball to include lxc-devsetup

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agochange version to 2.0.0.rc6 in configure.ac lxc-2.0.0.rc6
Stéphane Graber [Mon, 7 Mar 2016 23:20:40 +0000 (18:20 -0500)] 
change version to 2.0.0.rc6 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #875 from hallyn/cgfsng
Stéphane Graber [Mon, 7 Mar 2016 21:24:44 +0000 (16:24 -0500)] 
Merge pull request #875 from hallyn/cgfsng

cgfsng: next generation filesystem-backed cgroup implementation

9 years agocgfsng: try to chown tasks and cgroup.procs 875/head
Serge Hallyn [Mon, 7 Mar 2016 20:20:14 +0000 (12:20 -0800)] 
cgfsng: try to chown tasks and cgroup.procs

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #878 from stgraber/master
Serge Hallyn [Mon, 7 Mar 2016 20:09:36 +0000 (12:09 -0800)] 
Merge pull request #878 from stgraber/master

Fix apparmor

9 years agoMerge pull request #872 from clopez/lxc-devsetup-sysvinit-upstart
Stéphane Graber [Mon, 7 Mar 2016 20:02:39 +0000 (15:02 -0500)] 
Merge pull request #872 from clopez/lxc-devsetup-sysvinit-upstart

Execute script lxc-devsetup also with sysvinit and upstart.

9 years agoProperly update the generated apparmor profiles 878/head
Stéphane Graber [Mon, 7 Mar 2016 20:01:17 +0000 (15:01 -0500)] 
Properly update the generated apparmor profiles

Some changes happened but the final profiles weren't generated...

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoRevert "allow cgroupfs mounts under /sys/fs/cgroup"
Stéphane Graber [Mon, 7 Mar 2016 20:00:05 +0000 (15:00 -0500)] 
Revert "allow cgroupfs mounts under /sys/fs/cgroup"

This reverts commit 833bf9c2b29ff03cb5e5e1db089d25757f4a2647.

This change wasn't actually safe and is now superseded by the cgns profile.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agocgfsng: print debuginfo if LXC_DEBUG_CGFSNG env variable is set
Serge Hallyn [Mon, 7 Mar 2016 19:24:41 +0000 (11:24 -0800)] 
cgfsng: print debuginfo if LXC_DEBUG_CGFSNG env variable is set

Note this is printing to stdout because it runs before logging is setup.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocgfsng - remove the code checking whether devices cgroup lines are already done
Serge Hallyn [Mon, 7 Mar 2016 19:16:43 +0000 (11:16 -0800)] 
cgfsng - remove the code checking whether devices cgroup lines are already done

We may need to revert this, but I *think* we no longer need this
with default configs.  The idea iirc was that if caller cannot
write to devices.allow (i.e. is in a user namespace), then ignore
permission failures if the cgroups are already sufficiently setup.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocomment fixups
Serge Hallyn [Mon, 7 Mar 2016 19:04:30 +0000 (11:04 -0800)] 
comment fixups

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #876 from d4s/upstream
Stéphane Graber [Mon, 7 Mar 2016 17:56:26 +0000 (12:56 -0500)] 
Merge pull request #876 from d4s/upstream

Added ALTLinux distribution.

9 years agochmod container cgroup 775
Serge Hallyn [Sun, 6 Mar 2016 09:52:01 +0000 (01:52 -0800)] 
chmod container cgroup 775

so that container root can create sub-cgroups

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoAdded ALTLinux distribution. 876/head
Denis Pynkin [Sat, 5 Mar 2016 13:40:17 +0000 (16:40 +0300)] 
Added ALTLinux distribution.

- Added ALTLinux distribution.
- Updated template for ALTLinux Sisyphus

Signed-off-by: Denis Pynkin <denis_pynkin@epam.com>
9 years agocgfsng: print error when reaching 1000 failed cgroup creations
Serge Hallyn [Sat, 5 Mar 2016 08:38:54 +0000 (00:38 -0800)] 
cgfsng: print error when reaching 1000 failed cgroup creations

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agouse strchr in place of index bc bionic
Serge Hallyn [Sat, 5 Mar 2016 08:36:14 +0000 (00:36 -0800)] 
use strchr in place of index bc bionic

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #873 from brauner/bugfix_branch
Serge Hallyn [Sat, 5 Mar 2016 04:19:46 +0000 (20:19 -0800)] 
Merge pull request #873 from brauner/bugfix_branch

lxc-attach: fix redirection - stderr

9 years agocgfsng: next generation filesystem-backed cgroup implementation
Serge Hallyn [Thu, 3 Mar 2016 18:31:23 +0000 (10:31 -0800)] 
cgfsng: next generation filesystem-backed cgroup implementation

This makes simplifying assumptions:  all usable cgroups must be
mounted under /sys/fs/cgroup/controller or /sys/fs/cgroup/contr1,contr2.

Currently this will only work with cgroup namespaces, because
lxc.mount.auto = cgroup is not implemented.  So cgfsng_ops_init()
returns NULL if cgroup namespaces are not enabled.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agotests: add lxc-test-attach-test 873/head
Christian Brauner [Fri, 4 Mar 2016 20:12:31 +0000 (21:12 +0100)] 
tests: add lxc-test-attach-test

Test if the various types of I/O redirection work with lxc-attach.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agolxc-attach: fix redirection - stderr
Christian Brauner [Fri, 4 Mar 2016 18:32:00 +0000 (19:32 +0100)] 
lxc-attach: fix redirection - stderr

So that we can do things like:

lxc-attach -n a -- sh -c 'echo ERR >&2' > /dev/null

There seems to be no easy way to discern when we need to write to stderr
instead of stdout when we receive an event on the master fd of an allocated
pty. So we're using a "trick"/"hack". We write to STDOUT_FILENO if it refers to
a pty. If STDOUT_FILENO does not refer to a pty we check whether STDERR_FILENO
refers to a pty and if so write to it.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoExecute script lxc-devsetup also with sysvinit and upstart. 872/head
Carlos Alberto Lopez Perez [Fri, 4 Mar 2016 15:40:21 +0000 (16:40 +0100)] 
Execute script lxc-devsetup also with sysvinit and upstart.

  * This script sets /dev/.lxc which is needed for autodev containers.
  * Previously was only executed with systemd. Execute it also with
    the other init systems (sysvinit and upstart)

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
9 years agoMerge pull request #871 from ysbnim/master
Christian Brauner [Fri, 4 Mar 2016 08:54:43 +0000 (09:54 +0100)] 
Merge pull request #871 from ysbnim/master

doc: Update Korean lxc-attach(1) and lxc-copy(1), Improve lxc-unshare(1)

9 years agodoc: improve lxc-unshare(1) 871/head
Sungbae Yoo [Fri, 4 Mar 2016 03:01:15 +0000 (12:01 +0900)] 
doc: improve lxc-unshare(1)

Explain that the pipe symbol needs to be escaped for -s.

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: improve Korean lxc-attach(1)
Sungbae Yoo [Fri, 4 Mar 2016 02:55:03 +0000 (11:55 +0900)] 
doc: improve Korean lxc-attach(1)

Explain that the pipe symbol needs to be escaped for -e and -s.
Update for commit 759d521

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: add copy hook explanation to Korean lxc-copy(1)
Sungbae Yoo [Fri, 4 Mar 2016 02:25:16 +0000 (11:25 +0900)] 
doc: add copy hook explanation to Korean lxc-copy(1)

Update for commit cc0607a

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agochange version to 2.0.0.rc5 in configure.ac lxc-2.0.0.rc5
Stéphane Graber [Thu, 3 Mar 2016 15:58:28 +0000 (10:58 -0500)] 
change version to 2.0.0.rc5 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #868 from brauner/bugfix_branch
Stéphane Graber [Thu, 3 Mar 2016 15:50:53 +0000 (10:50 -0500)] 
Merge pull request #868 from brauner/bugfix_branch

console.{c.h}: add/improve documentation

9 years agoconsole.{c.h}: add/improve documentation 868/head
Christian Brauner [Thu, 3 Mar 2016 14:47:49 +0000 (15:47 +0100)] 
console.{c.h}: add/improve documentation

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #867 from tenforward/plamo
Christian Brauner [Thu, 3 Mar 2016 10:21:41 +0000 (11:21 +0100)] 
Merge pull request #867 from tenforward/plamo

plamo: Update release version and repository for getting packages

9 years agoplamo: Update release version and repository for getting packages 867/head
KATOH Yasufumi [Wed, 2 Mar 2016 08:48:52 +0000 (17:48 +0900)] 
plamo: Update release version and repository for getting packages

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agoMerge pull request #866 from tenforward/japanese_man
Christian Brauner [Thu, 3 Mar 2016 09:16:28 +0000 (10:16 +0100)] 
Merge pull request #866 from tenforward/japanese_man

Update Japanese lxc-attach(1) and lxc-copy(1)

9 years agodoc: improve Japanese lxc-attach(1) 866/head
KATOH Yasufumi [Thu, 3 Mar 2016 07:20:34 +0000 (16:20 +0900)] 
doc: improve Japanese lxc-attach(1)

Explain that the pipe symbol needs to be escaped for -e and -s.
Update for commit 759d521

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agodoc: add copy hook explanation to Japanese lxc-copy(1)
KATOH Yasufumi [Thu, 3 Mar 2016 07:13:35 +0000 (16:13 +0900)] 
doc: add copy hook explanation to Japanese lxc-copy(1)

Update for commit cc0607a

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agoMerge pull request #865 from hallyn/2016-03-02/cgfs.rmperms
Stéphane Graber [Thu, 3 Mar 2016 00:59:23 +0000 (19:59 -0500)] 
Merge pull request #865 from hallyn/2016-03-02/cgfs.rmperms

2016 03 02/cgfs.rmperms

9 years agolxc-test-unpriv: try to start the container a second time 865/head
Serge Hallyn [Thu, 3 Mar 2016 00:17:17 +0000 (16:17 -0800)] 
lxc-test-unpriv: try to start the container a second time

We have nothing else testing this, and it was a real regression in lp
bug 1552355.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocgfs: don't try to remove cgroups we haven't created
Serge Hallyn [Thu, 3 Mar 2016 00:11:14 +0000 (16:11 -0800)] 
cgfs: don't try to remove cgroups we haven't created

info_ptr->created_paths_count can be 0, so don't blindly dereference
info_ptr->created_paths[ created_paths_count - 1].  Apparently we never
used to have 0 at the cleanup_name_on_this_level before, but now that
we can fail with -eperm and not just -eexist, we do.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocgfs: be less verbose
Serge Hallyn [Wed, 2 Mar 2016 23:23:33 +0000 (15:23 -0800)] 
cgfs: be less verbose

don't always warn about unused cgroups, it's noisy and not helpful

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agocgfs: switch to userns when removing cgroup
Serge Hallyn [Wed, 2 Mar 2016 22:00:13 +0000 (14:00 -0800)] 
cgfs: switch to userns when removing cgroup

Otherwise unprivileged users may not have the privilege needed to
remove their cgroups.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #864 from brauner/bugfix_branch
Stéphane Graber [Wed, 2 Mar 2016 15:04:04 +0000 (10:04 -0500)] 
Merge pull request #864 from brauner/bugfix_branch

Add features/small improvements to man pages (lxc-attach, lxc-copy)

9 years agolxc-copy: update help to include hook options 864/head
Christian Brauner [Wed, 2 Mar 2016 13:14:06 +0000 (14:14 +0100)] 
lxc-copy: update help to include hook options

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agolxc-copy: add copy hook explanation to manpage
Christian Brauner [Wed, 2 Mar 2016 13:06:52 +0000 (14:06 +0100)] 
lxc-copy: add copy hook explanation to manpage

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agolxc-attach: small improvements to manpage
Christian Brauner [Wed, 2 Mar 2016 11:48:38 +0000 (12:48 +0100)] 
lxc-attach: small improvements to manpage

Explain that the pipe symbol needs to be escaped for -e and -s.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #863 from brauner/bugfix_branch
Stéphane Graber [Tue, 1 Mar 2016 22:40:11 +0000 (17:40 -0500)] 
Merge pull request #863 from brauner/bugfix_branch

lxc-copy: correct order of copy and original & lxc-attach: setup ts->stdoutfd

9 years agolxc-attach: setup ts->stdoutfd 863/head
Christian Brauner [Tue, 1 Mar 2016 22:05:59 +0000 (23:05 +0100)] 
lxc-attach: setup ts->stdoutfd

Otherwise we cannot do things like:

- lxc-attach -n a runlevel </dev/null
- lxc-attach -n a runlevel </dev/null 2>/dev/null
- lxc-attach -n a runlevel </dev/null 2>/dev/null | cat

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agolxc-copy: correct order of copy and original
Christian Brauner [Tue, 1 Mar 2016 20:50:55 +0000 (21:50 +0100)] 
lxc-copy: correct order of copy and original

lxc-copy -n ORIG -N COPY -e

accidently printed

"Created ORIG as clone of COPY"

instead of

"Created COPY as clone of ORIG".
Fix the ordering.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #862 from brauner/2016-03-01/post_stop_fail_no_reboot
Stéphane Graber [Tue, 1 Mar 2016 16:53:51 +0000 (11:53 -0500)] 
Merge pull request #862 from brauner/2016-03-01/post_stop_fail_no_reboot

start.c: do not reboot on lxc.hook.post-stop fail

9 years agostart.c: do not reboot on lxc.hook.post-stop fail 862/head
Christian Brauner [Tue, 1 Mar 2016 09:42:45 +0000 (10:42 +0100)] 
start.c: do not reboot on lxc.hook.post-stop fail

lxc should not reboot the container when lxc.hook.post-stop fails. It should
simply shutdown. This makes the behavior of lxc.hook.post-stop and
lxc.hook.pre-start consistent. When lxc.hook.pre-start fails, the container
does not start.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #859 from brauner/bugfix_branch
Serge Hallyn [Mon, 29 Feb 2016 22:18:10 +0000 (14:18 -0800)] 
Merge pull request #859 from brauner/bugfix_branch

lxc-attach: always allocate current controlling pty

9 years agolxc-attach: always allocate current controlling pty 859/head
Christian Brauner [Mon, 29 Feb 2016 09:52:43 +0000 (10:52 +0100)] 
lxc-attach: always allocate current controlling pty

lxc-attach uses lxc_console_create() to allocate a pty on the host.
lxc_console_create() in turn calls lxc_console_peer_default() which either
makes the current controlling pty our controlling pty for the container, or
uses whatever the user gave us (e.g. /dev/tty2 etc.). For lxc-attach we always
want the current controlling pty to be used. This commit ensures that we're in
fact always using the current controlling pty. The commit also fixes a segfault
when the user specified lxc.console.path = none.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #857 from brauner/bugfix_branch
Serge Hallyn [Sat, 27 Feb 2016 18:46:09 +0000 (10:46 -0800)] 
Merge pull request #857 from brauner/bugfix_branch

cgfs: don't chown/chmod/rm non-existing paths

9 years agocgfs: don't chown/chmod/rm non-existing paths 857/head
Christian Brauner [Sat, 27 Feb 2016 16:00:45 +0000 (17:00 +0100)] 
cgfs: don't chown/chmod/rm non-existing paths

Dirty fix for the current noisiness when lxc_cgroupfs_create() could not create
cgroups.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agochange version to 2.0.0.rc4 in configure.ac lxc-2.0.0.rc4
Stéphane Graber [Sat, 27 Feb 2016 03:30:43 +0000 (22:30 -0500)] 
change version to 2.0.0.rc4 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #856 from hallyn/2016-02-26/cgfs.cgns.2
Christian Brauner [Fri, 26 Feb 2016 22:08:22 +0000 (23:08 +0100)] 
Merge pull request #856 from hallyn/2016-02-26/cgfs.cgns.2

cgfs: ignore mount prefix in mountinfo if cgroup namespaces are suppo…

9 years agocgfs: ignore mount prefix in mountinfo if cgroup namespaces are supported 856/head
Serge Hallyn [Fri, 26 Feb 2016 21:35:24 +0000 (13:35 -0800)] 
cgfs: ignore mount prefix in mountinfo if cgroup namespaces are supported

This is not 100% correct, but will suffice until we fix the kernel so that
we can distinguish between bind mounts and namespaced cgroupfs mounts.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #855 from hallyn/2016-02-26/cgfs.crucial
Christian Brauner [Fri, 26 Feb 2016 20:55:27 +0000 (21:55 +0100)] 
Merge pull request #855 from hallyn/2016-02-26/cgfs.crucial

fix cgfs failure for unpriv users

9 years agofix cgfs failure for unpriv users 855/head
Serge Hallyn [Fri, 26 Feb 2016 20:03:09 +0000 (20:03 +0000)] 
fix cgfs failure for unpriv users

Cgmanager was taught awhile ago that only some cgroup controllers are
crucial.  Teach cgfs the same thing.

This patch needs improvement, but will fix failure of lxc without cgmanager
for unprivileged users for now.  In particular, needed improvements include:

1. the check for crucial subsystems needs to include lxc.use
2. we should keep a list of the actually used subsystems so we don't keep
trying to chmod and enter after create has found we couldn't use a particular
subsystem

This fixes unprivileged lxc use.  It does not appear to suffice to fix
nested unprivilegd lxd usage.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agoMerge pull request #751 from jirutka/alpine-tmpl
Christian Brauner [Fri, 26 Feb 2016 14:46:02 +0000 (15:46 +0100)] 
Merge pull request #751 from jirutka/alpine-tmpl

Rewrite template script for Alpine Linux

9 years agoMerge pull request #852 from brauner/bugfix_branch
Stéphane Graber [Fri, 26 Feb 2016 14:44:05 +0000 (09:44 -0500)] 
Merge pull request #852 from brauner/bugfix_branch

lxc-ls: count spaces

9 years agolxc-alpine: allow to install additional packages 751/head
Jakub Jirutka [Sun, 21 Feb 2016 00:31:19 +0000 (01:31 +0100)] 
lxc-alpine: allow to install additional packages

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
9 years agolxc-alpine: cache APK packages instead of rootfs
Jakub Jirutka [Sun, 21 Feb 2016 00:03:03 +0000 (01:03 +0100)] 
lxc-alpine: cache APK packages instead of rootfs

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
9 years agolxc-alpine: remove all bashisms, make it compatible with dash
Jakub Jirutka [Sun, 7 Feb 2016 14:04:13 +0000 (15:04 +0100)] 
lxc-alpine: remove all bashisms, make it compatible with dash

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
9 years agolxc-alpine: make it compatible with ash, replace curl and rsync
Jakub Jirutka [Sat, 23 Jan 2016 17:55:58 +0000 (18:55 +0100)] 
lxc-alpine: make it compatible with ash, replace curl and rsync

Now it runs even on minimal Alpine system without bash, curl, openssl or
rsync.

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
9 years agolxc-alpine: completely rewrite the template script
Jakub Jirutka [Mon, 4 Jan 2016 21:20:09 +0000 (22:20 +0100)] 
lxc-alpine: completely rewrite the template script

New template script is more readable and robust, uses cache and external
LXC config file as other templates.

Signed-off-by: Jakub Jirutka <jakub@jirutka.cz>
9 years agoMerge pull request #854 from ysbnim/master
Christian Brauner [Fri, 26 Feb 2016 11:48:23 +0000 (12:48 +0100)] 
Merge pull request #854 from ysbnim/master

Update Korean manuals

9 years agoMerge pull request #853 from tenforward/japanese_man
Christian Brauner [Fri, 26 Feb 2016 11:45:48 +0000 (12:45 +0100)] 
Merge pull request #853 from tenforward/japanese_man

doc: Update Japanese lxc-attach(1)

9 years agodoc: Update Japanese lxc-attach(1) 853/head
KATOH Yasufumi [Fri, 26 Feb 2016 11:05:09 +0000 (20:05 +0900)] 
doc: Update Japanese lxc-attach(1)

Update the description of pty allocation. Update for commit 478dda7.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agodoc: Add the Korean description that automount is ignored when cgroup namespaces... 854/head
Sungbae Yoo [Fri, 26 Feb 2016 10:32:12 +0000 (19:32 +0900)] 
doc: Add the Korean description that automount is ignored when cgroup namespaces are supported.

Update for commit 4608594

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: Update Korean lxc-clone(1) and lxc-start-ephemeral(1)
Sungbae Yoo [Fri, 26 Feb 2016 10:16:07 +0000 (19:16 +0900)] 
doc: Update Korean lxc-clone(1) and lxc-start-ephemeral(1)

Update for commit 2ae6732.

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: Update Korean lxc-attach(1)
Sungbae Yoo [Fri, 26 Feb 2016 09:39:09 +0000 (18:39 +0900)] 
doc: Update Korean lxc-attach(1)

Update for commit e986ea3

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: Add the Korean description of cgns apparmor profile in lxc.container.conf
Sungbae Yoo [Thu, 25 Feb 2016 06:39:00 +0000 (15:39 +0900)] 
doc: Add the Korean description of cgns apparmor profile in lxc.container.conf

Update for commit 7a126ae

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agodoc: Add LXC_CGNS_AWARE env to Korean lxc.container.conf(5)
Sungbae Yoo [Thu, 25 Feb 2016 06:21:10 +0000 (15:21 +0900)] 
doc: Add LXC_CGNS_AWARE env to Korean lxc.container.conf(5)

Update for commit c4cafa0

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
9 years agolxc-ls: count spaces 852/head
Christian Brauner [Fri, 26 Feb 2016 10:18:47 +0000 (11:18 +0100)] 
lxc-ls: count spaces

Otherwise line wrapping might occur too late.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #851 from tych0/set-sid-in-init
Serge Hallyn [Fri, 26 Feb 2016 01:00:20 +0000 (17:00 -0800)] 
Merge pull request #851 from tych0/set-sid-in-init

start: setsid in init task as well

9 years agostart: setsid in init task as well 851/head
Tycho Andersen [Fri, 26 Feb 2016 00:04:01 +0000 (17:04 -0700)] 
start: setsid in init task as well

If we don't do this, we'll leak the parent's session id to the container,
which maybe doesn't matter, but it still seems better to set it anyway.

Also, it breaks CRIU for containers that don't call setsid themselves.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
9 years agoMerge pull request #849 from brauner/2016-02-25/fix_attach_container_put
Serge Hallyn [Thu, 25 Feb 2016 19:48:26 +0000 (11:48 -0800)] 
Merge pull request #849 from brauner/2016-02-25/fix_attach_container_put

lxc-attach: rework pty allocation

9 years agoMerge pull request #850 from hallyn/2016-02-25/cgfs.lxcfs
Stéphane Graber [Thu, 25 Feb 2016 19:39:28 +0000 (14:39 -0500)] 
Merge pull request #850 from hallyn/2016-02-25/cgfs.lxcfs

cgfs: make sure we use valid cgroup mountpoints

9 years agocgfs: make sure we use valid cgroup mountpoints 850/head
Serge Hallyn [Thu, 25 Feb 2016 19:01:12 +0000 (11:01 -0800)] 
cgfs: make sure we use valid cgroup mountpoints

If lxcfs starts before cgroup-lite, then the first cgroup mountpoints in
/proc/self/mountinfo are /run/lxcfs/*.  Unprivileged users cannot access
these.  So privileged containers are ok, and unprivileged containers are ok
since they won't cache those to begin with.  But unprivileged root-owned
containers cache /run/lxcfs/* and then try to use them.

So when doing cgroup automounting check whether the mountpoints we have
stored are accessible, and if not look for a new one to use.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
9 years agolxc-attach: rework pty allocation 849/head
Christian Brauner [Thu, 25 Feb 2016 14:22:53 +0000 (15:22 +0100)] 
lxc-attach: rework pty allocation

Previously we implemented two ways to get a pty for lxc-attach:
1. get a pty in the container
2. get a pty on the host

Where 1. was the default and 2. was only tried after 1. failed.
For safety and simplicity reasons, we remove 1. and just keep 2. around.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
9 years agoMerge pull request #847 from tenforward/japanese_man
Christian Brauner [Thu, 25 Feb 2016 07:57:21 +0000 (08:57 +0100)] 
Merge pull request #847 from tenforward/japanese_man

Update Japanese man

9 years agodoc: Update Japanese lxc.container.conf(5) 847/head
KATOH Yasufumi [Thu, 25 Feb 2016 06:38:30 +0000 (15:38 +0900)] 
doc: Update Japanese lxc.container.conf(5)

- Add the description that automount is ignored when cgroup namespaces
  are supported. Update for commit 4608594.
- Unify terminology of translation

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agodoc: Update Japanese lxc-clone(1) and lxc-start-ephemeral(1)
KATOH Yasufumi [Thu, 25 Feb 2016 06:15:41 +0000 (15:15 +0900)] 
doc: Update Japanese lxc-clone(1) and lxc-start-ephemeral(1)

describe that lxc-clone and lxc-start-ephemeral have been deprecated
in those man pages.
Update for commit 2ae6732.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
9 years agochange version to 2.0.0.rc3 in configure.ac lxc-2.0.0.rc3
Stéphane Graber [Thu, 25 Feb 2016 02:13:20 +0000 (21:13 -0500)] 
change version to 2.0.0.rc3 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
9 years agoMerge pull request #846 from hallyn/2016-02-24/cgns.auto
Stéphane Graber [Thu, 25 Feb 2016 02:11:29 +0000 (21:11 -0500)] 
Merge pull request #846 from hallyn/2016-02-24/cgns.auto

cgfs: do not automount if cgroup namespaces are supported