- 27 Mar, 2014 1 commit
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 26 Mar, 2014 1 commit
-
-
Bogdan Purcareata authored
Add LXC_NET_NONE to known lxc_network_types, so parsing a config file with lxc.network.type = none does not result in failure (e.g. doc/examples/lxc-no-netns.conf). Options have also been reordered to match the enum in conf.h. Signed-off-by:
Bogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 25 Mar, 2014 1 commit
-
-
Serge Hallyn authored
If we start a lxc_wait on a container while it is exiting, it is possible that we open the command socket, then the command socket monitor closes all its mainloop sockets and exit, then we send our credentials. Then we get killed by SIGPIPE. Handle that case, recognizing that if we get sigpipe then the container is (now) stopped. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 24 Mar, 2014 4 commits
-
-
Stéphane Graber authored
This updates all configs to include the exact same set of 7 bind-mounted devices: - console - full - null - random - tty - urandom - zero Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
Don't bother access information that the user didn't request. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
This resolves the memory math when memsw is enabled and fixes reporting of nested containers memory when using cgmanager. Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Bogdan Purcareata authored
Signed-off-by:
Bogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 23 Mar, 2014 3 commits
-
-
Michael H. Warfield authored
Added code to catch SIGPWR for Upstart in Fedora and CentOS containers as well as for Systemd in Fedora containers. Signed-off-by:
Michael H. Warfield <mhw@WittsEnd.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Michael H. Warfield authored
If the container does not already contain an /etc/localtime timezone definition, then copy a definition from the host to the container. This is often a symlink to an appropriate system timezone definition files and is presumed to exist in Signed-off-by:
Michael H. Warfield <mhw@WittsEnd.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Michael H. Warfield authored
Corner case existed when building a cross-arch container (i686 on x86_64) on a cross-distro host (Fedora container on Ubuntu host). Fixed the arch "fixup" code to do the right thing when running from the bootstrap. Signed-off-by:
Michael H. Warfield <mhw@WittsEnd.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 21 Mar, 2014 6 commits
-
-
Dwight Engen authored
The fds for stdin,stdout,stderr that we were leaving open for /sbin/init in the container were those from /dev/tty or lxc.console (if given), which wasn't right. Inside the container it should only have access to the pty that lxc creates representing the console. This was noticed because busybox's init was resetting the termio on its stdin which was effecting the actual users terminal instead of the pty. This meant it was setting icanon so were were not passing keystrokes immediately to the pty, and hence command line history/editing wasn't working. Fix by dup'ing the console pty to stdin,stdout,stderr just before exec()ing /sbin/init. Fix fd leak in error handling that I noticed while going through this code. Also tested with lxc.console = none, lxc.console = /dev/tty7 and no lxc.console specified. V2: The first version was getting EBADF sometimes on dup2() because lxc_console_set_stdfds() was being called after lxc_check_inherited() had already closed the fds for the pty. Fix by calling lxc_check_inherited() as late as possible which also extends coverage of open fd checked code. V3: Don't move lxc_check_inherited() since it needs to be called while the tmp proc mount is still mounted. Move call to lxc_console_set_stdfds() just before it. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
KATOH Yasufumi authored
Update for commit a526a632Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
It looks like either libdbus or libnih is showing some corruption with threaded access to the cgmanager-client library. Until we can straighten that out, mutex access to the cgmanager. The worst part of this is having to take and drop the mutex at every fork. This also means that we can't keep a connection open for the duration of container startup, since that would deadlock forks. If we were going to keep it like this, then we could get rid of some code in start.c. However we take a performance hit here which I really hope we can rectify soon. The other approach we could take would be to keep a global count of references to cgroup_manager. Mutex the open, close, and each use of the cgroup_manager proxy (and the inc/dec of the refcount). This way we could in fact keep the connection open for the duration of container start. The atfork handler child_fn would have to close the connection if open. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Holger Amann authored
/etc/mtab doesn’t exist after bootstrapping a debian container, and will be created as regular file after first start. That leads to at least two errors: - output of `mount` is wrong and get messed up the more often you start/stop the container - /dev/pts/ptmx has wrong permissions Signed-off-by:
Holger Amann <holger@sauspiel.de> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Reported-by:
Robie Basak <robie.basak@canonical.com> Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 13 Mar, 2014 12 commits
-
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Stéphane Graber authored
This should finally silence this test for good :) Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
KATOH Yasufumi authored
Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
When cgmanager is around, use dbus-send to setup the cgroups, this allows the tests to work in a container without cgroupfs access. 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>
-
Serge Hallyn authored
Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
to speed up tests where it doesn't matter Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Dwight Engen authored
You can have both cgmanager and cgfs compiled in, and lxc will fall back at runtime to cgfs if it cannot connect to cgmanager, so print the failure to connect as a DEBUG like the code used to do. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
There are two parts to this fix. First, create a private DBusConnection manually, instead of using nih_dbus_connect. The latter always creates a shared connection, which cannot be closed. Note: creating an actual shared connection, mutexing it among all threads, and creating per-thread proxies would be an alternative - however we don't want long-lived connections as they tend not to be reliable (especially if cgmanager restarts). Second, use pthread_setspecific to create per-thread keys which can be associated with destructors. Specify a destructor which closes the dbus connection. If a thread dies while holding cgmanager, the connection will be closed. Otherwise, we close the connection and unset the key. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
KATOH Yasufumi authored
update for commit e447a8a7Signed-off-by:
KATOH Yasufumi <karma@jazz.email.ne.jp> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
- 10 Mar, 2014 4 commits
-
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
Serge Hallyn authored
Depending on where during container creation we failed, cgroup_path may be NULL. Don't try to delete the cgroup in that case. (Also fix a wrong function name in an ERROR message) Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@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>
-
- 08 Mar, 2014 2 commits
-
-
Stéphane Graber authored
Signed-off-by:
Stéphane Graber <stgraber@ubuntu.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Opening a debug log for every thread at every iteration of test-concurrent causes it to quickly run out of fd's because this fd is leaked. Fix this by adding a new api: lxc_log_close(). As Caglar noted, the log handling is in general a bit "interesting" because a logfile can be opened through the per-container api c->set_config_item("lxc.logfile") but lxc_log_fd is now per-thread data. It just so happens in test-concurrent that there is a 1:1 mapping of threads to logfiles. Split out getting debug logs from quiet since I think they are useful separately. If debug is specified, get a log of any mode, not just during start. Signed-off-by:Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 07 Mar, 2014 6 commits
-
-
Stéphane Graber authored
Instead of maintaining hardcoded lists, point everyone to --help and have the current list of valid and default fields printed there. 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>
-
Serge Hallyn authored
This prevents things like bridges from being destroyed by the kernel. My hope is that just doing this will be enough to also ensure that the device will be available to be renamed immediately, so that we don't need to do a retry loop. Tested with a dummy device. renaming dummy0 to dummy5 in container, then shutting down container, returns dummy0 to the host. 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
Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
This doesn't solve the general design problem of the log.c (eg; some log lines got lost or scattered into multiple files) but at least prevent multithreaded code from crashing. Before this change something like following; sudo src/tests/lxc-test-concurrent -i 10 -j 20 was crashing nearly all the time due to 3afbcc46 as we started to set lxc.loglevel and lxc.logfile with that commit. Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-