- 10 May, 2010 6 commits
-
-
Guillaume Zitta authored
With a friend, we installed lxc on his server. We spend 1 hour on the kernel config because we didn't knew : - that lxc-checkconfig is a bash script and it can check a config before running it - which kernel config item whas not good - that CONFIG_SECURITY_FILE_CAPABILITIES is obsolete since 2.6.33 So, here is a patch for lxc-checkconfig that could save time for lxc newbies Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com> Modified-by:
Daniel Lezcano <daniel.lezcano@free.fr> Signed-off-by:
Guillaume Zitta <lxc@zitta.fr>
-
Daniel Lezcano authored
Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
"lxc configure does not exist. You need to run ./autogen.sh to create it. I think it needs to either be documented in INSTALL or you provide ./configure" Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com> Reported-by:
Jamal Hadi Salim <hadi@cyberus.ca>
-
Daniel LEzcano authored
Clean up and factor a bit the pivot_root code. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
First of all, when trying to start a container in a read-only root lxc-start complains: lxc-start: Read-only file system - can't make temporary mountpoint This is in conf.c:setup_rootfs_pivot_root() function. That function uses optional parameter "lxc.pivotdir", or creates (and later removes) a temporary directory for pivot_root. Obviously there's no way to create a directory in a read-only filesystem. But lxc.pivotdir does not work either. In the function mentioned above it is used with leading dot (eg. if I specify "lxc.pivotdir=pivot" in the config file the pivot_root() syscall will be made to ".pivot" with leading dot, not to "pivot"), but later on it is used without that dot, and fails: lxc-start: No such file or directory - failed to open /pivot/proc/mounts lxc-start: No such file or directory - failed to read or parse mount list '/pivot/proc/mounts' lxc-start: failed to pivot_root to '/stage/t' (that's with "lxc.pivotdir = pivot" in the config file). After symlinking pivot to .pivot it still fails: lxc-start: Device or resource busy - could not unmount old rootfs lxc-start: failed to pivot_root to '/stage/t' Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com> Reported-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Daniel Lezcano authored
When the client console exits, the mainloop goes in an infinite loop as the handler is not removed and we are notified from the disconnection indefinitely. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 07 May, 2010 2 commits
-
-
Daniel Lezcano authored
If the SIGCHLD is sent from a process different from the container's init process we ignore it, otherwise we finish to wait it. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
When the init container is stopped, we don't check this condition and we assume the child exited and we wait indefinitely for the child to exit while this one is stopped. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 29 Apr, 2010 18 commits
-
-
Michel Normand authored
Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
to be able to have lxc_fini symetric with lxc_init Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
do the same checking as already done in lxc/restart.c 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
There is only one such perror call, so remove it in nl.c In this same patch, verify that all functions of nl.c and network.c are reporting a -errno value in case of error; value that is reported in lxc log by the callers in conf.c Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
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 5 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>
-