- 27 Sep, 2013 5 commits
-
-
Christian Seiler authored
This adds quite a few more ways to mount the cgroup filesystem automatically: - Specify ro/rw/mixed: - ro: everything mounted read-only - rw: everything mounted read-write - mixed: only container's own cgroup is rw, rest ro (default) - Add cgroup-full that mounts the entire cgroup tree to the corresponding directories. ro/rw/mixed also apply here. Signed-off-by:Christian Seiler <christian@iwakd.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Christian Seiler authored
Signed-off-by:
Christian Seiler <christian@iwakd.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Christian Seiler authored
Improve lxc.mount.auto code: allow the user to specify whether to mount certain things read-only or read-write. Also make the code much more easily extensible for the future. Signed-off-by:
Christian Seiler <christian@iwakd.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
This adds a new -i flag to lxc-info to print the container's IP addresses using get_ips(). Example: $ lxc-info -n lxc-dev -s -p -i state: RUNNING pid: 21331 ip: 10.0.3.165 ip: 2607:f2c0:f00f:2751:e9ca:842f:efa9:97d1 ip: 2607:f2c0:f00f:2751:216:3eff:fe3a:f1c1 Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 26 Sep, 2013 2 commits
-
-
Serge Hallyn authored
(Which will also break failure-to-build in the !HAVE_LIBGNUTLS case) Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
- change get_template_path() to only return NULL or non-NULL since one of the callers was doing a free(-1) which caused the segfault. Handle the NULL template case in the lxcapi_create() caller. - make sure to free(tpath) in the sha1sum_file() failure case Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 25 Sep, 2013 7 commits
-
-
Dwight Engen authored
Currently, a maximum of one LSM within LXC will be initialized and used. If in the future stacked LSMs become a reality, we can support it without changing the configuration syntax and add support for more than a single LSM at a time to the lsm code. Generic LXC code should note that lsm_process_label_set() will take effect "now" for AppArmor, and upon exec() for SELinux. - fix Oracle template mounting of proc and sysfs, needed when using SELinux Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Make sure to free line. Don't free 'info' when freeing base_info will later free info. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Don't worry about saved_errno since none of the *_free routines will set it Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
This one's easier to review by looking at the before and after files. It splits up lxc_cgroup_load_meta2() by adding 3 helpers. The result seems easier to reason about. A question I had, is, should the kernel_subsystems ** be freed in the success case? I assumed it was being used elsewhere but I can't find where. Currently it is only being freed in the error case. I suspect we want to free it in the success case as well. Cc: Christian Seiler <christian@iwakd.de> Cc: Dwight Engen <dwight.engen@oracle.com> Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
KATOH Yasufumi authored
Character encoding of Japanese man pages is UTF-8. But docbook-utils can't treat it (and don't have --encoding option that use in Makefile). So change to Japanese man pages is not generated when docbook-utils is used. Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 24 Sep, 2013 2 commits
-
-
Qiang Huang authored
Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Qiang Huang authored
In lxc_cmd(), we use snprintf(path, len, "%s/%s/command", lxcpath ? lxcpath : inpath, name); to fill sock name, this assume lxcpath have no trailing slashes, so if we use lxc-info -n test -P /usr/local/var/lib/lxc_anon/ to get a running container's state, we will get state: STOPPED which is wrong, because we combine a wrong sock name. To fix this, just remove trailing slashes when parsing arguments. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 23 Sep, 2013 6 commits
-
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
The API header was included in a variety of ways before, standardize those to "include <lxc/lxccontainer.h>" as this will always work both in tree and on a system with the headers installed. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Qiang Huang authored
info to help users locate the misconfig. Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 21 Sep, 2013 1 commit
-
-
S.Çağlar Onur authored
Being able to set close_all_fds via API would be usefull for the situations like running an application (let's say web server) that controls the lifecycle of the container using the LXC API. We don't want forked process to inherit parent's resource (file, socket, ...) Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 20 Sep, 2013 1 commit
-
-
Serge Hallyn authored
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 18 Sep, 2013 4 commits
-
-
Serge Hallyn authored
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
S.Çağlar Onur authored
get_ips accepts an interface name as a parameter but there was no way to get the interfaces names from the container. This patch introduces a new get_interfaces call to the API so that users can obtain the name of the interfaces. Support for python bindings also introduced as a part of this version. Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
pthread_mutex_lock() will only return an error if it was set to PTHREAD_MUTEX_ERRORCHECK and we are recursively calling it (and would otherwise have deadlocked). If that's the case then log a message for future debugging and exit. Trying to "recover" is nonsense at that point. process_lock() was held over too long a time in lxcapi_start() in the daemonize case. (note the non-daemonized case still needs a check to enforce that it must NOT be called while threaded). Add process_lock() at least across all open/close/socket() calls. Anything done after a fork() doesn't need the locks as it is no longer threaded - so some open/close/dups()s are not locked for that reason. However, some common functions are called from both threaded and non-threaded contexts. So after doing a fork(), do a possibly-extraneous process_unlock() to make sure that, if we were forked while pthread mutex was held, we aren't deadlocked by nobody. Tested that lp:~serge-hallyn/+junk/lxc-test still works with this patch. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Tested-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 16 Sep, 2013 4 commits
-
-
Dwight Engen authored
- add ability to run for multiple iterations - can also run non-threaded for comparison to threaded case Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Qiang Huang authored
Signed-off-by:
Qiang Huang <h.huangqiang@huawei.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 14 Sep, 2013 3 commits
-
-
Serge Hallyn authored
This should deadlock with daemonized start due to af_unix changes. Do this later, but do it more carefully. This reverts commit 002f3cff.
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 13 Sep, 2013 2 commits
-
-
Serge Hallyn authored
Otherwise user-namespace containers will hang on mountall. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
S.Çağlar Onur authored
use busybox instead of ubuntu to test as it's much more lightweight, also wait containers to enter desired state Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 12 Sep, 2013 3 commits
-
-
S.Çağlar Onur authored
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Christian Seiler authored
Chane pinning mechanism: Use $rootfs/lxc.hold instead of $rootfs.hold (in case $rootfs is a mountpoint itself), but delete the file immediately after creating it (but keep it open). This will keep the root filesystem busy but does not leave any unnecessary files lying around. Signed-off-by:
Christian Seiler <christian@iwakd.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-