- 16 Apr, 2013 4 commits
-
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Also check that we wrote the amount we expected to. The write on the pty is blocking but we could still get a short write on EINTR, so we should SYSERROR it. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
This makes it match the manpage and be consistent with lxc-execute Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 15 Apr, 2013 13 commits
-
-
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
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
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
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Unfortunately installing a working lxc-init is somewhat hairy and distro-dependent. So we skipped it before, but Coverity didn't like that, so just ifdef it out. 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>
-
- 12 Apr, 2013 3 commits
-
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
if sem_init fails, free what we mallocd. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 11 Apr, 2013 2 commits
-
-
Serge Hallyn authored
1. in container_free, set c->privlock to NULL before calling sem_destroy, to prevent a window where another thread could call sem_wait(c->privlock) while c->privlock is not NULL but is already destroyed. 2. in container_get, check for numthreads < 0 before calling lxclock. Once numthreads is 0, it never goes back up. Following is a comment added to lxccontainer.c: /* * Consider the following case: freer | racing get()er ================================================================== lxc_container_put() | lxc_container_get() \ lxclock(c->privlock) | c->numthreads < 1? (no) \ c->numthreads = 0 | \ lxclock(c->privlock) -> waits \ lxcunlock() | \ \ lxc_container_free() | \ lxclock() returns | \ c->numthreads < 1 -> return 0 \ \ (free stuff) | \ \ sem_destroy(privlock) | * When the get()er checks numthreads the first time, one of the following * is true: * 1. freer has set numthreads = 0. get() returns 0 * 2. freer is between lxclock and setting numthreads to 0. get()er will * sem_wait on privlock, get lxclock after freer() drops it, then see * numthreads is 0 and exit without touching lxclock again.. * 3. freer has not yet locked privlock. If get()er runs first, then put()er * will see --numthreads = 1 and not call lxc_container_free(). */ Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Seth Arnold <seth.arnold@canonical.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Signed-off-by:Stéphane Graber <stgraber@ubuntu.com>
-
- 10 Apr, 2013 7 commits
-
-
Dwight Engen authored
The ubuntu template will silently fail (because it is set -e) on the locale-gen command when LANG=C Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Fix lxc-create to not word split template arguments. This makes lxc-create -n ol -t oracle -- -r "at cronie wget" work since the argument to -r will be passed as one arg instead of three. Fix oracle template -u option to shift the correct amount. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Wojciech Izykowski authored
Corrected ssh option for custom key (from -k to -i). Just see ssh manpage for justification. Signed-off-by:
Wojciech Izykowski <wizykowski@gmail.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Commit 37c3dfc9 sets the wait status on only the child pid. It intended to match the pid only once to protect against pid reuse but it won't because the indicator was reset to 0 every time at the top of the loop. If the child pid is reused, the wait status will be set again. Fix by setting indicator outside the loop. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
Dwight Engen authored
Commit e3642c43 added lxc_copy_file for use in 64e1ae63. The use of it was removed in commit 1bc60a65. Removing it reduces dead code and the footprint of liblxc. Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 09 Apr, 2013 1 commit
-
-
Serge Hallyn authored
Otherwise if called from dash with set -e, dash will exit. This causes lxc-clone to fail. Signed-off-by:Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 05 Apr, 2013 2 commits
-
-
Daniel Lezcano authored
Signed-off-by:Daniel Lezcano <daniel.lezcano@free.fr>
-
git://github.com/lxc/lxcDaniel Lezcano authored
Signed-off-by:Daniel Lezcano <daniel.lezcano@free.fr>
-
- 01 Apr, 2013 6 commits
-
-
Dwight Engen authored
Signed-off-by:
Dwight Engen <dwight.engen@oracle.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Stéphane Graber authored
Currently it always calls create/destroy which might be confusing for the code that checks the return value of those calls to determine whether operation completed successfully or not. >>> c = lxc.Container("r") >>> c.create("ubuntu") True >>> c.create("ubuntu") True >>> c.create("ubuntu") True >>> c.create("ubuntu") True >>> c.create("ubuntu") >>> c.destroy() True >>> c.destroy() lxc-destroy: 'r' does not exist False >>> c.destroy() lxc-destroy: 'r' does not exist False New behaviour >>> c = lxc.Container("r") >>> c.create('ubuntu') True >>> c.create('ubuntu') False >>> c.destroy() True >>> c.destroy() False >>> Tested with following script; import lxc c = lxc.Container("abcdef") print ("set", c.set_config_item("lxc.utsname", "abcdef")) print ("save", c.save_config()) print ("create", c.create("ubuntu")) print ("create", c.create("ubuntu")) print ("destroy", c.destroy()) print ("destroy", c.destroy()) print ("set", c.set_config_item("lxc.utsname", "abcdef")) print ("save", c.save_config()) print ("destroy", c.destroy()) print ("destroy", c.destroy()) Signed-off-by:S.Çağlar Onur <caglar@10ur.org> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
S.Çağlar Onur authored
Currently it returns the default path only if /etc/lxc/lxc.conf missing. Since default lxc.conf doesn't contain lxcpath variable (this is at least the case in ubuntu) all tools fails if one doesn't give -P caglar@qgq:~/Project/lxc/examples$ sudo /usr/bin/lxc-create -n test lxc-create: no configuration path defined Signed-off-by:
S.Çağlar Onur <caglar@10ur.org> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Serge Hallyn authored
Otherwise, as an example, if doing 'lxc-create -t debian' while there is a 'debian' directory, lxc-create will fail to do the right thing. Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
-
Christian Seiler authored
This patch introduces the --clear-env and --keep-env options for lxc-attach, that allows the user to specify whether the environment should be passed on inside the container or not. This is to be expanded upon in later versions, this patch only introduces the most basic functionality. Signed-off-by:
Christian Seiler <christian@iwakd.de> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
Christian Seiler authored
The following rationale is for using the -t option: Currently, lxc-shutdown uses a subprocess for the timeout handling, where a 'sleep $TIMEOUT' is executed, which will kill the main process after the timeout has occurred, thus causing the main process to stop the container hard with lxc-stop. On the other hand, if the timeout is not reached, the main process kills the subprocess. The trouble now is that if you kill a shell that is running in the background, the kill will only take effect as soon as the program currently running in the shell exits. This in turn means that the subprocess will never terminate before reaching the timeout. In an interactive shell, this does not matter, since people will just not notice the process and lxc-shutdown returns immediately. In a non-interactive enironment, however, there may be circumstances that cause the calling program to wait until even that subprocess is terminated, which means that shutdown will always take as long as the timeout, even if the container shuts down quite a bit earlier. This change makes sure that also all subprocesses of the background process are killed from the main process. This will immediately terminate the background process, thus ensuring the desired behaviour. Signed-off-by:
Christian Seiler <christian@iwakd.de> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-
- 28 Mar, 2013 1 commit
-
-
Serge Hallyn authored
Though it's more subtle than that. If the file doesn't exist or we can't access it, then don't record it. But if we have parse errors, then do. This is mainly to help out API users who try to read a container configuration file before calling c->create(). If the file doesn't exist, then without this patch the subsequent create() will not use the default /etc/lxc/default.conf. The API user could check for the file ahead of time, but this check makes his life easier without costing us anything. Signed-off-by:
S.Çağlar Onur" <caglar@10ur.org> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
-
- 27 Mar, 2013 1 commit
-
-
Matthias Brugger authored
This patch fixes a small typo in the man page. Signed-off-by:
Matthias Brugger <matthias.bgg@gmail.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-