]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
10 years agoprovide an example SELinux policy for older releases
Dwight Engen [Thu, 24 Jul 2014 21:25:46 +0000 (17:25 -0400)]
provide an example SELinux policy for older releases

The virtd_lxc_t type provided by the default RHEL/CentOS/Oracle 6.5
policy is an unconfined_domain(), so it doesn't really enforce anything.
This change will provide a link in the documentation to an example
policy that does confine containers.

On more recent distributions with new enough policy, it is recommended
not to use this sample policy, but to use the types already available
on the system from /etc/selinux/targeted/contexts/lxc_contexts, ie:

process = "system_u:system_r:svirt_lxc_net_t:s0"
file = "system_u:object_r:svirt_sandbox_file_t:s0"

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoAdd the remaining bits for lxc.environment
Stéphane Graber [Mon, 21 Jul 2014 16:20:58 +0000 (18:20 +0200)]
Add the remaining bits for lxc.environment

This adds the few missing bits so that the new lxc.environment config
entry can be queried, cleared and saved as the others are.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoSupport providing env vars to container init
Matt Palmer [Tue, 1 Jul 2014 07:01:39 +0000 (17:01 +1000)]
Support providing env vars to container init

It's quite useful to be able to configure containers by specifying
environment variables, which init (or initscripts) can use to adjust the
container's operation.

This patch adds one new configuration parameter, `lxc.environment`, which
can be specified zero or more times to define env vars to set in the
container, like this:

    lxc.environment = APP_ENV=production
    lxc.environment = SYSLOG_SERVER=192.0.2.42
    lxc.environment = SOMETHING_FUNNY=platypus

Default operation is unchanged; if the user doesn't specify any
lxc.environment parameters, the container environment will be what it is
today ('container=lxc').

Signed-off-by: Matt Palmer <mpalmer@hezmatt.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agodownload: Have wget retry 3 times
Stéphane Graber [Mon, 21 Jul 2014 10:25:20 +0000 (12:25 +0200)]
download: Have wget retry 3 times

This forces wget to retry if it gets a network error.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agolxc-start: Daemonize by default
Stéphane Graber [Mon, 21 Jul 2014 09:52:19 +0000 (11:52 +0200)]
lxc-start: Daemonize by default

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agolxc-start: Add -F (foreground) option
Stéphane Graber [Mon, 21 Jul 2014 09:50:49 +0000 (11:50 +0200)]
lxc-start: Add -F (foreground) option

Introduce a new -F option (no-op for now) as an opposite of -d.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoMerge pull request #285 from martinpitt/master
hallyn [Wed, 30 Jul 2014 14:53:36 +0000 (09:53 -0500)]
Merge pull request #285 from martinpitt/master

apparmor: Allow slave bind mounts

10 years agoapparmor: Allow slave bind mounts
Martin Pitt [Wed, 30 Jul 2014 14:43:10 +0000 (16:43 +0200)]
apparmor: Allow slave bind mounts

Without this, if the system uses shared subtrees by default (like systemd), you
get a large stream of

  lxc-start: Permission denied - Failed to make /<mountpoint> rslave
  lxc-start: Continuing...

with

  apparmor="DENIED" operation="mount" info="failed flags match" error=-13
  profile="/usr/bin/lxc-start" name="/" pid=17284 comm="lxc-start" flags="rw, slave"

and eventual failure plus a lot of leftover mounts in the host.

https://launchpad.net/bugs/1325468

10 years agoadd help string for ubuntu templete
Trần Ngọc Quân [Mon, 28 Jul 2014 08:34:54 +0000 (15:34 +0700)]
add help string for ubuntu templete

Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agofix typo in btrfs error msg
Serge Hallyn [Sun, 27 Jul 2014 15:53:54 +0000 (10:53 -0500)]
fix typo in btrfs error msg

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agofix typo
Serge Hallyn [Wed, 23 Jul 2014 15:19:24 +0000 (10:19 -0500)]
fix typo

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agoSupport openvswitch bridges
Serge Hallyn [Mon, 21 Jul 2014 22:48:55 +0000 (17:48 -0500)]
Support openvswitch bridges

We detect whether ovs-vsctl is available.  If so, then we support
adding network interfaces to openvswitch bridges with it.

Note that with this patch, veths do not appear to be removed from the
openvswitch bridge.  This seems a bug in openvswitch, as the veths
in fact do disappear from the system.  If lxc is required to remove
the port from the bridge manually, that becomes more complicated
for unprivileged containers, as it would require a setuid-root
wrapper to be called at shutdown.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agounprivileged containers: use next available nic name if unspecified
Serge Hallyn [Mon, 21 Jul 2014 21:36:44 +0000 (16:36 -0500)]
unprivileged containers: use next available nic name if unspecified

Rather than always using eth0.  Otherwise unpriv containers cannot have
multiple lxc.network.type = veth's without manually setting
lxc.network.name =.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agoSysvinit script fixes
Ansa89 [Thu, 17 Jul 2014 08:53:30 +0000 (10:53 +0200)]
Sysvinit script fixes

Signed-off-by: Stefano Ansaloni <ansalonistefano@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoAdd SIGPWR support to lxc_init
Nikolay Martynov [Sun, 20 Jul 2014 19:35:04 +0000 (15:35 -0400)]
Add SIGPWR support to lxc_init

This patch adds SIGPWR support to lxc_init.
This helps to properly shutdown lxc_init based containers.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoremove mountcgroup hook entirely
Serge Hallyn [Thu, 17 Jul 2014 22:20:34 +0000 (17:20 -0500)]
remove mountcgroup hook entirely

Also fix the comment in lxc-cirros template (which I overlooked last time).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoRemove mention of mountcgroups in ubuntu.common config
Serge Hallyn [Thu, 17 Jul 2014 14:05:35 +0000 (09:05 -0500)]
Remove mention of mountcgroups in ubuntu.common config

That mount hook predates the lxc.mount.auto = cgroup option.  So mention
that instead.

Perhaps we should simply drop the mountcgroup hook from the tree, but
I'm not doing that in this patch.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agolxc-test-{unpriv,usernic.in}: make sure to chgrp as well
Serge Hallyn [Thu, 17 Jul 2014 21:02:06 +0000 (16:02 -0500)]
lxc-test-{unpriv,usernic.in}: make sure to chgrp as well

These tests are failing on new kernels because the container root is
not privileged over the directories, since privilege no requires
the group being mapped into the container.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agodoc: Add mention that veth.pair is ignored for unpriv in Japanese man
KATOH Yasufumi [Wed, 16 Jul 2014 16:32:38 +0000 (01:32 +0900)]
doc: Add mention that veth.pair is ignored for unpriv in Japanese man

Update Japanese lxc.container.conf(5) for commit 8982c0f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agodoc: Mention that veth.pair is ignored for unpriv
Stéphane Graber [Wed, 16 Jul 2014 01:32:46 +0000 (21:32 -0400)]
doc: Mention that veth.pair is ignored for unpriv

veth.pair is ignore for unprivileged containers as allowing an
unprivileged user to set a specific device name would allow them to
trigger actions in tools like NetworkManager or other uevent based
handlers that may react based on specific names or prefixes being used.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agocentos template: prevent mingetty from calling vhangup(2)
Claudio Alarcon-Reyes [Fri, 11 Jul 2014 15:32:32 +0000 (11:32 -0400)]
centos template: prevent mingetty from calling vhangup(2)

When using unprivileged containers, tty fails because of vhangup. Adding
--nohangup to nimgetty, it fixes the issue. This is the same problem
occurred for oracle template, commit 2e83f7201c5d402478b9849f0a85c62d5b9f1589

Signed-off-by: Claudio Alarcon clalarco@gmail.com
10 years agoFix typo in previous patch
Stéphane Graber [Mon, 14 Jul 2014 19:44:41 +0000 (15:44 -0400)]
Fix typo in previous patch

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoconfile: sanity-check netdev->type before setting netdev->priv elements
Serge Hallyn [Mon, 14 Jul 2014 18:51:41 +0000 (18:51 +0000)]
confile: sanity-check netdev->type before setting netdev->priv elements

The netdev->priv is shared for the netdev types.  A bad config file
could mix configuration for different types, resulting in a bad
netdev->priv when starting or even destroying a container.  So sanity
check the netdev->type before setting a netdev->priv element.

This should fix https://github.com/lxc/lxc/issues/254

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agorootfs_is_blockdev: don't run if no rootfs is specified
Serge Hallyn [Mon, 14 Jul 2014 18:22:53 +0000 (13:22 -0500)]
rootfs_is_blockdev: don't run if no rootfs is specified

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agotests: lxc-test-ubuntu doesn't actually need bind9-host
Stéphane Graber [Wed, 9 Jul 2014 17:30:54 +0000 (13:30 -0400)]
tests: lxc-test-ubuntu doesn't actually need bind9-host

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agotests: Clarify error message and fix return codes
Stéphane Graber [Wed, 9 Jul 2014 17:17:54 +0000 (13:17 -0400)]
tests: Clarify error message and fix return codes

Reported-by: Michael J. Evans
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-debian: added support for package installation
Alexander Dreweke [Tue, 8 Jul 2014 05:17:37 +0000 (07:17 +0200)]
lxc-debian: added support for package installation

- added --mirror, --security-mirror and --package parameters
- generate source.list
- install packages into final lxc instance

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-debian: standardize formatting
Alexander Dreweke [Tue, 8 Jul 2014 05:16:54 +0000 (07:16 +0200)]
lxc-debian: standardize formatting

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-debian: fix formatting
Alexander Dreweke [Tue, 8 Jul 2014 05:15:31 +0000 (07:15 +0200)]
lxc-debian: fix formatting

added space ">/" -> ">  /"

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agochange version to 1.1.0.alpha1 in configure.ac
Stéphane Graber [Mon, 7 Jul 2014 16:49:12 +0000 (12:49 -0400)]
change version to 1.1.0.alpha1 in configure.ac

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoAlso add --verison support to lxc-start-ephemeral
Stéphane Graber [Mon, 7 Jul 2014 16:48:07 +0000 (12:48 -0400)]
Also add --verison support to lxc-start-ephemeral

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-ubuntu: update coding style
José Martínez [Sun, 6 Jul 2014 20:11:41 +0000 (22:11 +0200)]
lxc-ubuntu: update coding style

Signed-off-by: José Martínez <xosemp@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-ubuntu: fix btrfs when rootfs == realrootfs
José Martínez [Sun, 6 Jul 2014 19:55:41 +0000 (21:55 +0200)]
lxc-ubuntu: fix btrfs when rootfs == realrootfs

Fix btrfs support when lxc-create does not bind-mount the rootfs.

Signed-off-by: José Martínez <xosemp@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoAdd support for --version to lxc-ls and lxc-device
Stéphane Graber [Mon, 7 Jul 2014 14:17:28 +0000 (10:17 -0400)]
Add support for --version to lxc-ls and lxc-device

This is based on the patch submitted by:
 Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>

Updated to use lxc.version rather than @LXC_VERSION@ and to apply to
both lxc-ls and lxc-device rather than just the former.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoFix attach_wait and threads
Dorian Eikenberg [Sun, 6 Jul 2014 17:44:19 +0000 (19:44 +0200)]
Fix attach_wait and threads

Signed-off-by: Dorian Eikenberg <dorian.eikenberg@uni-duesseldorf.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoFix incorrect timeout handling of do_reboot_and_check()
Yuto KAWAMURA(kawamuray) [Fri, 4 Jul 2014 17:35:09 +0000 (02:35 +0900)]
Fix incorrect timeout handling of do_reboot_and_check()

Currently do_reboot_and_check() is decreasing timeout variable even if
it is set to -1, so running 'lxc-stop --reboot --timeout=-1 ...' will
exits immediately at end of second iteration of loop, without waiting
container reboot.
Also, there is no need to call gettimeofday if timeout is set to -1, so
these statements should be evaluated only when timeout is enabled.

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoChange find_fstype_cb to ignore blank lines and comments
Yuto KAWAMURA(kawamuray) [Fri, 4 Jul 2014 17:40:02 +0000 (02:40 +0900)]
Change find_fstype_cb to ignore blank lines and comments

/etc/filesystems could be contain blank lines and comments.
Change find_fstype_cb() to ignore blank lines and comments which starts
with '#'.

Signed-off-by: Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agolxc-oracle: mount cgroup:mixed
Dwight Engen [Thu, 3 Jul 2014 19:32:12 +0000 (15:32 -0400)]
lxc-oracle: mount cgroup:mixed

- Mounting cgroup:mixed prevents systemd inside the container from
  moving its children out of the cgroups lxc setup. This ensure the
  limits setup in the configuration or with lxc-cgroup are effective.

- Update for the OL7 channel name that will be used on
  public-yum.oracle.com.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agomake the container exit code propagate to lxc-start exit code when appropriate
Rodrigo Vaz [Thu, 3 Jul 2014 18:39:51 +0000 (15:39 -0300)]
make the container exit code propagate to lxc-start exit code when appropriate

Signed-off-by: Rodrigo Sampaio Vaz <rodrigo@heroku.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agochown_mapped_root: don't try chgrp if we don't own the file
Serge Hallyn [Thu, 3 Jul 2014 18:57:57 +0000 (13:57 -0500)]
chown_mapped_root: don't try chgrp if we don't own the file

New kernels require that to have privilege over a file, your
userns must have the old and new groups mapped into your userns.
So if a file is owned by our uid but another groupid, then we
have to chgrp the file to our primary group before we can try
(in a new user namespace) to chgrp the file to a group id in the
namespace.

But in some cases (when cloning) the file may already be mapped
into the container.  Now we cannot chgrp the file to our own
primary group - and we don't have to.

So detect that case.  Only try to chgrp the file to our primary
group if the file is owned by our euid (i.e. not by the container)
and the owning group is not already mapped into the container by
default.

With this patch, I'm again able to both create and clone containers
with no errors again.

Reported-by: S.Çağlar Onur <caglar@10ur.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoEnable default seccomp profile for all distros
Stéphane Graber [Wed, 2 Jul 2014 01:38:18 +0000 (21:38 -0400)]
Enable default seccomp profile for all distros

This updates the common config to include Serge's seccomp profile by
default for privileged containers.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoMerge pull request #244 from xose/btrfs
hallyn [Mon, 30 Jun 2014 21:18:35 +0000 (16:18 -0500)]
Merge pull request #244 from xose/btrfs

lxc-ubuntu: use btrfs subvolumes and snapshots

10 years agoApparmor: allow hugetlbfs mounts everywhere
Jesse Tane [Mon, 30 Jun 2014 19:37:52 +0000 (15:37 -0400)]
Apparmor: allow hugetlbfs mounts everywhere

Signed-off-by: Jesse Tane <jesse.tane@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoCast to gid_t to fix android build failure
Stéphane Graber [Mon, 30 Jun 2014 17:08:48 +0000 (13:08 -0400)]
Cast to gid_t to fix android build failure

stat.st_gid is unsigned long in bionic instead of the expected gid_t, so
just cast it to gid_t.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoFix to work lxc-destroy with unprivileged containers on recent kernel
TAMUKI Shoichi [Sat, 28 Jun 2014 09:39:54 +0000 (18:39 +0900)]
Fix to work lxc-destroy with unprivileged containers on recent kernel

Change idmap_add_id() to add both ID_TYPE_UID and ID_TYPE_GID entries
to an existing lxc_conf, not just an ID_TYPE_UID entry, so as to work
lxc-destroy with unprivileged containers on recent kernel.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoFix to work lxc-start with unprivileged containers on recent kernel
TAMUKI Shoichi [Fri, 27 Jun 2014 08:29:01 +0000 (17:29 +0900)]
Fix to work lxc-start with unprivileged containers on recent kernel

Change chown_mapped_root() to map in both the root uid and gid, not
just the uid, so as to work lxc-start with unprivileged containers on
recent kernel.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoDon't call sig_name twice, use pointer instead
Alexander Vladimirov [Fri, 27 Jun 2014 17:32:30 +0000 (01:32 +0800)]
Don't call sig_name twice, use pointer instead

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agocgm_get: make sure @value is null-terminated
Serge Hallyn [Fri, 27 Jun 2014 18:51:33 +0000 (13:51 -0500)]
cgm_get: make sure @value is null-terminated

Previously this was done by strncpy, but now we just read
the len bytes - not including \0 - from a pipe, so pre-fill
@value with 0s to be safe.

This fixes the python3 api_test failure.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agocgmanager: have cgm_set and cgm_get use absolute path when possible
Serge Hallyn [Thu, 26 Jun 2014 21:44:46 +0000 (16:44 -0500)]
cgmanager: have cgm_set and cgm_get use absolute path when possible

This allows users to get/set cgroup settings when logged into a different
session than that from which they started the container.

There is no cgmanager command to do an _abs variant of cgmanager_get_value
and cgmanager_set_value.  So we fork off a new task, which enters the
parent cgroup of the started container, then can get/set the value from
there.  The reason not to go straight into the container's cgroup is that
if we are freezing the container, or the container is already frozen, we'll
freeze as well :)  The reason to fork off a new task is that if we are
in a cgroup which is set to remove-on-empty, we may not be able to return
to our original cgroup after making the change.

This should fix https://github.com/lxc/lxc/issues/246

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-archlinux.in: update securetty when lxc.devttydir is set
Alexander Vladimirov [Thu, 26 Jun 2014 07:43:11 +0000 (15:43 +0800)]
lxc-archlinux.in: update securetty when lxc.devttydir is set

Update container's /etc/securetty to allow console logins when lxc.devttydir is not empty.
Also use config entries provided by shared and common configuration files.

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-archlinux.in: Add pacman keyring initialization back
Alexander Vladimirov [Wed, 25 Jun 2014 04:52:20 +0000 (12:52 +0800)]
lxc-archlinux.in: Add pacman keyring initialization back

Shuffle around usage text a bit and add missing -d while there.

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoattach: Fix querying for the current personality
Stéphane Graber [Wed, 25 Jun 2014 19:33:30 +0000 (15:33 -0400)]
attach: Fix querying for the current personality

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agoReduce duplication in new style configs
Stéphane Graber [Fri, 20 Jun 2014 21:20:06 +0000 (17:20 -0400)]
Reduce duplication in new style configs

This is a rather massive cleanup of config/templates/*

As new templates were added, I've noticed that we pretty much all share
the tty/pts configs, some capabilities being dropped and most of the
cgroup configuration. All the userns configs were also almost identical.

As a result, this change introduces two new files:
 - common.conf.in
 - userns.conf.in

Each is included by the relevant <template>.<type>.conf.in templates,
this means that the individual per-template configs are now overlays on
top of the default config.

Once we see a specific key becoming popular, we ought to check whether
it should also be applied to the other templates and if more than 50% of
the templates have it set to the same value, that value ought to be
moved to the master config file and then overriden for the templates
that do not use it.

This change while pretty big and scary, shouldn't be very visible from a
user point of view, the actual changes can be summarized as:
 - Extend clonehostname to work with Debian based distros and use it for
   all containers.
 - lxc.pivotdir is now set to lxc_putold for all templates, this means
   that instead of using /mnt in the container, lxc will create and use
   /lxc_putold instead. The reason for this is to avoid failures when the
   user bind-mounts something else on top of /mnt.
 - Some minor cgroup limit changes, the main one I remember is
   /dev/console now being writable by all of the redhat based containers.
   The rest of the set should be identical with additions in the per-distro
   ones.
 - Drop binfmtmisc and efivars bind-mounts for non-mountall based
   unpriivileged containers as I assumed they got those from copy/paste
   from Ubuntu and not because they actually need those entries. (If I'm
   wrong, we probably should move those to userns.conf then).

Additional investigation and changes to reduce the config delta between
distros would be appreciated. In practice, I only expect lxc.cap.drop
and lxc.mount.entry to really vary between distros (depending on the
init system, the rest should be mostly common.

Diff from the RFC:
 - Add archlinux to the mix
 - Drop /etc/hostname from the clone hook

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoPrevent write_config from corrupting container config
Alexander Vladimirov [Tue, 24 Jun 2014 18:54:52 +0000 (02:54 +0800)]
Prevent write_config from corrupting container config

write_config doesn't check the value sig_name function returns,
this causes write_config to produce corrupted container config when
using non-predefined signal names.

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoUpdate Arch Linux template and add common configuration files
Alexander Vladimirov [Tue, 24 Jun 2014 17:27:54 +0000 (01:27 +0800)]
Update Arch Linux template and add common configuration files

Move common container configuration entries into template config.
Remove unnecessary service symlinking and configuration entries, as well as
guest configs and other redundant configuration, fix minor script bugs.
Clean up template command line, add -d option to allow disabling services.
Also enable getty's on all configured ttys to allow logins via lxc-console,
set lxc.tty value corresponding to default Arch /etc/securetty configuration.

This patch simplifies Arch Linux template a bit, while fixing some
longstanding issues. It also provides common configuration based on
files provided for Fedora templates.

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agodoc: Update Japanese lxc.container.conf(5) for lxc.cap.keep = none
KATOH Yasufumi [Tue, 24 Jun 2014 07:59:53 +0000 (16:59 +0900)]
doc: Update Japanese lxc.container.conf(5) for lxc.cap.keep = none

Update for commit 7035407

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agodon't build init.lxc.static if libcap.a isn't available
Dwight Engen [Fri, 20 Jun 2014 20:45:09 +0000 (16:45 -0400)]
don't build init.lxc.static if libcap.a isn't available

Note that building init.lxc.static still requires a static libutil.a
and libpthread.a, but these are available on most distro's through
glibc-static.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agocoverity: avoid possible null deref
Serge Hallyn [Mon, 23 Jun 2014 13:41:49 +0000 (08:41 -0500)]
coverity: avoid possible null deref

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agoInclude ubuntu.priv.seccomp in dist tarball
Stéphane Graber [Fri, 20 Jun 2014 22:08:11 +0000 (18:08 -0400)]
Include ubuntu.priv.seccomp in dist tarball

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoubuntu containers: use a seccomp filter by default (v2)
Serge Hallyn [Fri, 20 Jun 2014 20:40:42 +0000 (15:40 -0500)]
ubuntu containers: use a seccomp filter by default (v2)

Blacklist module loading, kexec, and open_by_handle_at (the cause of the
not-docker-specific dockerinit mounts namespace escape).

This should be applied to all arches, but iiuc stgraber will be doing
some reworking of the commonizations which will simplify that, so I'm
not doing it here.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoseccomp: fix 32-bit rules
Serge Hallyn [Fri, 20 Jun 2014 19:58:41 +0000 (14:58 -0500)]
seccomp: fix 32-bit rules

When calling seccomp_rule_add(), you must pass the native syscall number
even if the context is a 32-bit context.  So use resolve_name rather
than resolve_name_arch.

Enhance the check of /proc/self/status for Seccomp: so that we do not
enable seccomp policies if seccomp is not built into the kernel.  This
is needed before we can enable by-default seccomp policies (which we
want to do next)

Fix wrong return value check from seccomp_arch_exist, and remove
needless abstraction in arch handling.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoseccomp: support 'all' arch sections (plus bugfixes)
Serge Hallyn [Thu, 19 Jun 2014 20:52:34 +0000 (20:52 +0000)]
seccomp: support 'all' arch sections (plus bugfixes)

seccomp_ctx is already a void*, so don't use 'scmp_filter_ctx *'

Separately track the native arch from the arch a rule is aimed at.

Clearly ignore irrelevant architectures (i.e. arm rules on x86)

Don't try to load seccomp (and don't fail) if we are already
seccomp-confined.  Otherwise nested containers fail.

Make it clear that the extra seccomp ctx is only for compat calls
on 64-bit arch.  (This will be extended to arm64 when libseccomp
supports it).  Power may will complicate this (if ever it is supported)
and require a new rethink and rewrite.

NOTE - currently when starting a 32-bit container on 64-bit host,
rules pertaining to 32-bit syscalls (as opposed to once which have
the same syscall #) appear to be ignored.  I can reproduce that without
lxc, so either there is a bug in seccomp or a fundamental
misunderstanding in how I"m merging the contexts.

Rereading the seccomp_rule_add manpage suggests that keeping the seccond
seccomp context may not be necessary, but this is not something I care
to test right now.  If it's true, then the code could be simplified, and
it may solve my concerns about power.

With this patch I'm able to start nested containers (with seccomp
policies defined) including 32-bit and 32-bit-in-64-bit.

[ this patch does not yet add the default seccomp policy ]

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agofix the expansion of libexecdir when not explicitly passed to configure
Dwight Engen [Fri, 20 Jun 2014 18:22:06 +0000 (14:22 -0400)]
fix the expansion of libexecdir when not explicitly passed to configure

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agosplit -lcap and -lselinux out of LIBS
Dwight Engen [Thu, 19 Jun 2014 18:53:01 +0000 (14:53 -0400)]
split -lcap and -lselinux out of LIBS

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoallow lxc.cap.keep = none
Dwight Engen [Thu, 19 Jun 2014 21:58:11 +0000 (17:58 -0400)]
allow lxc.cap.keep = none

Commit 1fb86a7c introduced a way to drop capabilities without having to
specify them all explicitly. Unfortunately, there is no way to drop them
all, as just specifying an empty keep list, ie:

    lxc.cap.keep =

clears the keep list, causing no capabilities to be dropped.

This change allows a special value "none" to be given, which will clear
all keep capabilities parsed up to this point. If the last parsed value
is none, all capabilities will be dropped.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agodon't force dropping capabilities in lxc-init
Dwight Engen [Thu, 19 Jun 2014 13:01:26 +0000 (09:01 -0400)]
don't force dropping capabilities in lxc-init

Commit 0af683cf added clearing of capabilities to lxc-init, but only
after lxc_setup_fs() was done, likely so that the mounting done in
that routine wouldn't fail.

However, in my testing lxc_caps_reset() wasn't really effective
anyway since it did not clear the bounding set. Adding prctl
PR_CAPBSET_DROP in a loop from 0 to CAP_LAST_CAP would fix this, but I
don't think its necessary to forcefully clear all capabilities since
users can now specify lxc.cap.keep = none to drop all capabilities.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agodoc: Update Japanese lxc-snapshot(1) for adding the description of destroy
KATOH Yasufumi [Thu, 19 Jun 2014 09:21:49 +0000 (18:21 +0900)]
doc: Update Japanese lxc-snapshot(1) for adding the description of destroy

Update for commit 18aa217

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoFix typo in lxc_attach's usage
Stéphane Graber [Fri, 20 Jun 2014 18:04:44 +0000 (14:04 -0400)]
Fix typo in lxc_attach's usage

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoclone: make sure to update the rootfs path in unexpanded conf
Serge Hallyn [Wed, 18 Jun 2014 23:01:50 +0000 (18:01 -0500)]
clone: make sure to update the rootfs path in unexpanded conf

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agotravis warning: call the fn to clear policy alien statements (memleak)
Serge Hallyn [Wed, 18 Jun 2014 22:19:05 +0000 (17:19 -0500)]
travis warning: call the fn to clear policy alien statements (memleak)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agosnapshot test: make sure that external snapshot was really created
Serge Hallyn [Mon, 2 Jun 2014 13:53:16 +0000 (08:53 -0500)]
snapshot test: make sure that external snapshot was really created

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-download: Bump compat to 2 after OpenSUSE
Stéphane Graber [Wed, 18 Jun 2014 21:33:10 +0000 (17:33 -0400)]
lxc-download: Bump compat to 2 after OpenSUSE

OpenSUSE is now ready for the download template in the master branch,
however it's not going to be compatible with older LXC as they lack the
needed config files, so bump the compat level to 2 to indicate that the
current lxc-download can deal with the current OpenSUSE containers.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agosnapshots: move snapshot directory
Serge Hallyn [Tue, 27 May 2014 21:24:06 +0000 (16:24 -0500)]
snapshots: move snapshot directory

Originally we kept snapshots under /var/lib/lxcsnaps.  If a
separate btrfs is mounted at /var/lib/lxc, then we can't
make btrfs snapshots under /var/lib/lxcsnaps.

This patch moves the default directory to /var/lib/lxc/c/snaps.
If /var/lib/lxcsnaps already exists, then we continue to use that.

add c->destroy_with_snapshots() and c->snapshot_destroy_all()
API methods.  c->snashot_destroy_all() can be triggered from
lxc-snapshot using '-d ALL'.  There is no command to call
c->destroy_with_snapshots(c) as of yet.

lxclock: use ".$lxcname" for container lock files
that way we can use /run/lock/lxc/$lxcpath/$lxcname/snaps as a
directory when locking snapshots without having to worry about
/run/lock//lxc/$lxcpath/$lxcname being a file.

destroy: split off a container_destroy
container_destroy() doesn't check for snapshots, so snapshot_rename can
use it.  api_destroy() now does check for snapshots (previously it only
checked for fs - i.e. overlayfs/aufs - snapshots).

Add destroy to the manpage, as it was previously undocumented.

Update snapshot testcase accordingly.

[ rebased in the face of commits 840f05df and 7e36f87e. ]

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoconfile: fix a typo (s/len/str/) in my previous patch
Serge Hallyn [Wed, 18 Jun 2014 21:26:49 +0000 (16:26 -0500)]
confile: fix a typo (s/len/str/) in my previous patch

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
10 years agoStore alien config lines
Serge Hallyn [Thu, 12 Jun 2014 13:46:37 +0000 (13:46 +0000)]
Store alien config lines

Any config lines not starting with 'lxc.*' are ignored by lxc.  That
can be useful for third party tools, however lxc-clone does not copy such
lines.

Fix that by tracking such lines in our unexpanded config file and
printing them out at write_config().  Note two possible shortcomings here:

1. we always print out all includes followed by all aliens.  They are
not kept in order, nor ordered with respect to lxc.* lines.

2. we're still not storing comments. these could easily be added to
the alien lines, but i chose not to in particular since comments are
usually associated with other lines, so destroying the order would
destroy their value.  I could be wrong about that, and if I am it's
a trivial fix.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoAdd a unexpanded lxc_conf
Serge Hallyn [Thu, 12 Jun 2014 14:24:38 +0000 (14:24 +0000)]
Add a unexpanded lxc_conf

Currently when a container's configuration file has lxc.includes,
any future write_config() will expand the lxc.includes.  This
affects container clones (and snapshots) as well as users of the
API who make an update and then c.save_config().

To fix this, separately track the expanded and unexpanded lxc_conf.  The
unexpanded conf does not contain values read from lxc.includes.  The
expanded conf does.  Lxc functions mainly need the expanded conf to
figure out how to configure the container.  The unexpanded conf is used
at write_config().

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoUpdated lxc-opensuse for common configuration changes.
Michael H. Warfield [Wed, 18 Jun 2014 19:31:44 +0000 (15:31 -0400)]
Updated lxc-opensuse for common configuration changes.

Updated the lxc-opensuse template for the changes for the common
configuration used by the download template.  Changed the default
network mode in the container to dhcp.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoseccomp: warn but continue on unresolvable syscalls
Serge Hallyn [Wed, 18 Jun 2014 19:36:37 +0000 (19:36 +0000)]
seccomp: warn but continue on unresolvable syscalls

If a syscall is listed which is not resolvable, continue.  This allows
us to keep a more complete list of syscalls in a global seccomp policy
without having to worry about older kernels not supporting the newer
syscalls.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agobdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized
Leonid Isaev [Wed, 18 Jun 2014 02:21:47 +0000 (22:21 -0400)]
bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized

Signed-off-by: Leonid Isaev <lisaev@umail.iu.edu>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-ubuntu: use btrfs subvolumes and snapshots
José Martínez [Tue, 17 Jun 2014 21:01:33 +0000 (23:01 +0200)]
lxc-ubuntu: use btrfs subvolumes and snapshots

Try to create the cache rootfs as a btrfs subvolume, and use btrfs
snapshots to copy the rootfs if btrfs is selected as backing store.

Signed-off-by: José Martínez <xosemp@gmail.com>
10 years agolxc-autostart: Respect -P
Stéphane Graber [Sat, 14 Jun 2014 19:58:24 +0000 (15:58 -0400)]
lxc-autostart: Respect -P

-P was only used for log setup and not when retrieving the container list.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agotests: Avoid the download template when possible
Stéphane Graber [Fri, 13 Jun 2014 21:45:26 +0000 (17:45 -0400)]
tests: Avoid the download template when possible

The use of the download template with an hardcoded --arch=amd64 in aa.c
was causing test failures on any platform incapable of running amd64
binaries.

This wasn't noticed in the CI environment as we run the tests within
containers on an amd64 kernel but this caused failures on the Ubuntu CI
environment.

Instead, let's use the busybox template, tweaking the configuration when
needed to match the needs of the testcase.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agotests: Don't fail when HOME isn't defined
Stéphane Graber [Fri, 13 Jun 2014 21:08:44 +0000 (17:08 -0400)]
tests: Don't fail when HOME isn't defined

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agotests: apparmor: Always end with a newline
Stéphane Graber [Fri, 13 Jun 2014 19:54:31 +0000 (15:54 -0400)]
tests: apparmor: Always end with a newline

Some error messages in lxc-test-apparmor didn't end with a newline,
leading to slightly difficult to read output.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agocgfs: Log the whole cgroup path too
Stéphane Graber [Mon, 9 Jun 2014 22:27:24 +0000 (18:27 -0400)]
cgfs: Log the whole cgroup path too

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agotests: Wait 5s for init to respond in lxc-test-autostart
Stéphane Graber [Mon, 9 Jun 2014 21:13:56 +0000 (17:13 -0400)]
tests: Wait 5s for init to respond in lxc-test-autostart

lxc-test-autostart occasionaly fails at the restart test in the CI
environment. Looking at the current test case, the most obvious race
there is if lxc-wait exists succesfuly immediately after LXC marked the
container RUNNING (init spawned) but before init had a chance to setup
the signal handlers.

To avoid this potential race period, let's add a 5s delay between the
tests to give a chance for init to finish starting up.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agocontainer start: check for start hooks in container rootfs
Serge Hallyn [Tue, 10 Jun 2014 03:29:11 +0000 (03:29 +0000)]
container start: check for start hooks in container rootfs

Do so early enough that we can report a meaningful failure.

(This should fix https://github.com/lxc/lxc/issues/225)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agopython3: Fix crashes in snapshot()
Stéphane Graber [Mon, 9 Jun 2014 16:02:02 +0000 (12:02 -0400)]
python3: Fix crashes in snapshot()

This makes sure all PyObject structs are always initialized to NULL,
this will fix issues such as (issue #239).

Also add a snapshot/list/restore testcase to the python3 api test code.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agodoc: Fix typo in lxc-autostart(1)
KATOH Yasufumi [Thu, 5 Jun 2014 12:16:27 +0000 (21:16 +0900)]
doc: Fix typo in lxc-autostart(1)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agodoc: Update Japanese man pages for the description of boot and group handling
KATOH Yasufumi [Thu, 5 Jun 2014 12:16:26 +0000 (21:16 +0900)]
doc: Update Japanese man pages for the description of boot and group handling

Update lxc-autostart(1) and lxc.container.conf(5) for commit 015f0dd.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoTry to be more helpful on container startup failure
Stéphane Graber [Wed, 4 Jun 2014 18:05:25 +0000 (14:05 -0400)]
Try to be more helpful on container startup failure

This hides some of the confusing "command X failed to receive response"
why are usually caused by another more understandable error.

On failure to start() from lxc-start, a new error message is displayed,
suggesting the user sets logfile and loglevel and if using -d, restarts
the container in the foreground instead.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agolxc-download: Attempt to get the GPG key 3 times
Stéphane Graber [Tue, 3 Jun 2014 19:11:43 +0000 (15:11 -0400)]
lxc-download: Attempt to get the GPG key 3 times

This is to deal with the GPG pool occasionaly yielding broken servers.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agolxc-fedora.in: Correct some systemd target setups.
Michael H. Warfield [Tue, 3 Jun 2014 16:59:20 +0000 (12:59 -0400)]
lxc-fedora.in: Correct some systemd target setups.

Set the halt.target action to be sigpwr.target.  This allows
SIGPWR to properly shut the container down from lxc-stop.

Renable the systemd-journald.service.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxcapi_snapshot: check that c is defined
Serge Hallyn [Tue, 3 Jun 2014 18:16:03 +0000 (13:16 -0500)]
lxcapi_snapshot: check that c is defined

before using it, like the other snapshot api methods do.

This will need to go into stable-1.0 as well.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agopython3: Handle invalid global config keys
Stéphane Graber [Sun, 25 May 2014 14:33:37 +0000 (16:33 +0200)]
python3: Handle invalid global config keys

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agopython3: Don't require a template name
Stéphane Graber [Sun, 25 May 2014 12:36:28 +0000 (14:36 +0200)]
python3: Don't require a template name

The template name isn't required, if it's not passed, then create will
simply be asked to create a container without a rootfs.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
10 years agoFree lxc configuration structure
bartekplus [Wed, 28 May 2014 19:17:37 +0000 (21:17 +0200)]
Free lxc configuration structure

Signed-off-by: Bartosz Tomczyk <bartekplus@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agoCorrected debug message
bartekplus [Mon, 2 Jun 2014 18:07:13 +0000 (20:07 +0200)]
Corrected debug message

Signed-off-by: Bartosz Tomczyk <bartekplus@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agolxc-plamo: fix for configuring network interface
TAMUKI Shoichi [Tue, 3 Jun 2014 03:20:23 +0000 (12:20 +0900)]
lxc-plamo: fix for configuring network interface

Fix configure_plamo so as not to configure wireless network interface
in containers even if the host uses wireless network interface.

Signed-off-by: TAMUKI Shoichi <tamuki@linet.gr.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
10 years agopoint user to updated man page in template boilerplate
Dwight Engen [Tue, 27 May 2014 19:30:10 +0000 (15:30 -0400)]
point user to updated man page in template boilerplate

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>