- 29 Apr, 2010 13 commits
-
-
gkurz@linux.vnet.ibm.com authored
lxc-kill send a signal to the process 1 of the container. If this command is used on an application container ran by lxc-execute, the lxc-init will receive the signal and will forward it to the process 2 which is the command specified in the command line. Signed-off-by:
Greg Kurz <gkurz@fr.ibm.com> Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
reformating given examples and add reference to examples directory. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
update lxc man page to better explain: * the notions of persistent and volatil container. * the difference between lxc-execute and lxc-start commands Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
this is required to avoid to fill /cgroup with pid number each time lxc-unshare is called. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
it's usage was removed by patch 28a4b0e5 "open the console later" Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
as will be used later on in other patches. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
This new option is to have user to pass a fd in place of statefile name. Simple usage with file open in bash: === $rm -f *.log; lxc-execute -n foo -- pi1 44444 $rm -rf /tmp/sf; lxc-checkpoint -n foo -k --statefd 3 3>/tmp/sf && lxc-restart -n bar --statefd 4 4</tmp/sf === Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
the fd 0,1 and 2 are still inherited and we only need the fd 2 (stderr) after the start/restart of the application. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 08 Apr, 2010 7 commits
-
-
Daniel Lezcano authored
Fail when we try to attach to an non existing container Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
This patch will try to change the default "/" directory to the directory we were before attaching. In order to work correctly, the path has to exist in the container, that makes sense with a shared file system without rootfs. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
The command to attach has to be fork/exec. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
When the reboot is detected, reboot the container. That needs to set all file descriptor opened by lxc-start to be flagged with the close-on-exec flag, otherwise when re-execing ourself, we inherit our own fd. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
This patch allows to shutdown the container when the system is powered off in the container. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Store the container in the handler, so it is accessible everywhere. Signed-off-by:Daniel Lezcano <dlezcan@fr.ibm.com>
-
Daniel Lezcano authored
This patch adds a function to count the number of tasks in the container. The result is not reliable as it may change with a fork or an exit, but in some cases, for example, there is only one task, or the container is frozen, the result is accurate. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 02 Apr, 2010 2 commits
-
-
Daniel Lezcano authored
When no console is specified, do not try to setup the console. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
based on patch from: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> but also: * remove the deprecated --directory one. * change liblxc api of checkpoint/restart to use fd and not string. * explicitely report error messages for the checkpoint/restart stub functions. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 22 Mar, 2010 7 commits
-
-
Daniel Lezcano authored
Fix type and missing capability. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
The log file in lxc-init is quite useless as the code is trivial. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Cedric Le Goater <clg@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Wrong variable. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
When we try to attach to a container belonging to another user than us, the command fails as expected but the return code is wrong, so we have an "unknown error" instead of "permission denied". The culprit is: - strerror(command.answer.ret)); + strerror(-command.answer.ret)); The rest of the code is indentation without code impact. Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by:
Michel Normand <normand@fr.ibm.com>
-
Daniel Lezcano authored
This patch allows to execute a command or enter inside the container: * lxc-attach -n <name> [command] If the <command is not specified>, the lxc-attach will retrieve your uid and get your shell name and exec it in the container. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Open the console at the setup time, otherwise the openeded file descriptor will be considered as an inherited fd and the startup will fail. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Cedric Le Goater authored
This patch modifies the startup of a container to forbid opened fds, unless these are stdios. Signed-off-by:Cedric Le Goater <clg@fr.ibm.com>
-
- 26 Feb, 2010 2 commits
-
-
Daniel Lezcano authored
In the process of rollbacking, the handler->pid is not set we must not kill it. Otherwsise, kill(-1, SIGKILL), ouch ! ... Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Add the console.h file in order to compile the dist file. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 25 Feb, 2010 3 commits
-
-
Daniel Lezcano authored
Delete the network devices when an error occurs before they are moved to the network namespace (network namespace destruction triggers the network devices deletion). Otherwise they stay in the system. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Fix inconsistent function definition regarding the headers. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Add a function to delete the network device by its index. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 24 Feb, 2010 6 commits
-
-
Daniel Lezcano authored
Fix the warning: start.c: In function ‘lxc_fini’: start.c:250: warning: implicit declaration of function ‘lxc_unlink_nsgroup’ start.c: In function ‘lxc_spawn’: start.c:380: warning: implicit declaration of function ‘lxc_rename_nsgroup’ Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Silas Sewell authored
The patch fixes a build error on the devel version of Fedora. Signed-off-by:
Silas Sewell <silas@sewell.ch> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
When the umount fails, we force the umount and make the mount point unaccessible by using a lazy umount. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
When there is no rootfs, don't create a console. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
As the console output can be a tty, we want to have the terminal to be set as a specific manner to not echo and receive signals from the keyboard. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
The actual behaviour of the console is messy as: * it relies on a heuristic (tty or not, rootfs or not, etc ...) * the container init stole the tty and we lose the control The following patch: * allocates a tty * maps this tty to the container console * proxy the io from the console to the file specified in the configuration lxc.console=<file> That allows to specify a file, a fifo, a $(tty), and can be extended with an uri like file://mypath, net://1.2.3.4:1234, etc ... That solves the problem with the heuristic and the container does no longer stole our current tty. Note by default, the console output will go to a blackhole if no configuration is specified making the container showing nothing. In order to access the console from the tty, use lxc-start -n foo -s lxc.console=$(tty) I propose the make the container to daemonize by default now. I tried the following: in a shell: touch /var/lib/lxc/foo/console tail --retry -f /var/lib/lxc/foo/console in another shell: lxc-start -n foo -s lxc.console=/var/lib/lxc/foo/console Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-