- 25 Sep, 2013 5 commits
-
-
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 10 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>
-
Christian Seiler authored
This patch adds the lxc.mount.auto configuration option that allows the user to specify that certain standard filesystems should be automatically pre-mounted when the container is started. Currently, four things are implemented: - /proc (mounted read-write) - /sys (mounted read-only) - /sys/fs/cgroup (special logic, see mailing list discussions) - /proc/sysrq-trigger (see below) /proc/sysrq-trigger may be used from within a container to trigger a forced host reboot (echo b > /proc/sysrq-trigger) or do other things that a container shouldn't be able to do. The logic here is to bind-mount /dev/null over /proc/sysrq-trigger, so that that cannot happen. This obviously only protects fully if CAP_SYS_ADMIN is not available inside the container (otherwise that bind-mount could be removed). Signed-off-by:
Christian Seiler <christian@iwakd.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Christian Seiler authored
Add funbction to mount cgroup filesystem hierarchy into the container, allowing only access to the parts that the container should have access to, but none else. Signed-off-by:
Christian Seiler <christian@iwakd.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Christian Seiler authored
This patch splits off ns legacy cgroup handling from main cgroup handling. It moves the creation of the cgroups before clone(), so that the child will easily know which cgroups it will later belong to. Since this is not possible for the renaming of the 'ns' cgroup, keep that part after clone. 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>
-
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
We may long-term want to instead decide on a convention under /var/log, but for now just ignore it. This will only happen if lxcpath is read-only. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
- Also convert to unix abstract socket - A simple FNV hash is used instead of SHA-1 since we may not HAVE_GNUTLS Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 11 Sep, 2013 2 commits
-
-
Serge Hallyn authored
three issues raised by Christian Seiler: use pid_t, use snprintf, and use const. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Moving these files should allow $lxcpath to be a read-only fs. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-