- 15 Dec, 2009 1 commit
-
-
Jamal Hadi Salim authored
Add utility functions to parse a u16 and put a u16 on a netlink message Signed-off-by:
Jamal Hadi Salim <hadi@cyberus.ca> Acked-by:
Daniel Lezcano <daniel.lezcano@free.fr> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 26 Nov, 2009 9 commits
-
-
Daniel Lezcano authored
lxc_get_cgroup_path is used in the file but the header defining the function is missing. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Andrian Nord authored
If you're running (by mistake or typo) (via lxc-start) container that does not exists it will run with lxc.rootfs=/, meaning that /sbin/init will restart initialization procedure, efficiently messing host's system, that may lead to unpredictable results or even destroy (make inaccessible) host system (by reseting network configuration or something like that). (Actually, it _did_ destroy system of everyone who tested this). Actually, I finally lost any meaning of having such a feature for full-system containers. You may not use hosts's FS - it's described at above. You may not use some temporary directory - that's nonsense. This patch forbinds starting container via lxc-start without rcfile and custom start program, but probably it fixes only small part of problem. I really don't see much sense in such a feature without ability of overriding 'default' setting with command line switches. Anyway, default behaviour should be as save as possible. Signed-off-by:
Andrian Nord <NightNord@gmail.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
The rcfile is parsed in the lxc_start function. This is not the place to do that. Let's the caller to do that. In the meantime, we have the lxc_conf structure filled right before calling the lxc_start function so we can do some sanity check on the configuration to not break the system when we launch the container. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-
Jamal Hadi Salim authored
Remove unnecessary reset of msg.msg_controllen Signed-off-by:
Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Sven Wegener authored
commit 985d15b1 "fix fdleak and errors in lxc_create_tty()" created a zero-sized malloc(), causing memory corruption. use config->tty like all the other code does. Signed-off-by:
Sven Wegener <sven.wegener@stealer.net> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
the same cleanup as in instanciate_macvlan(). Just makes code shorter and less "jumpy" (as with goto back) Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
Currently we allocate veth device with random name on host side, so that things like firewall rules or accounting does not work at all. Fix this by recognizing yet anothe keyword to specify the host-side device name: lxc.network.pair, and use it instead of random name if specified. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
The purpose of this patch is to limit the search of pids to those in containers by looking at first in the /cgroup/<name>/tasks when --lxc or --names options are specified by user. The idea is to speedup the output when only few container names are specified while the machine is running with many processes. Signed-off-by:
Michel Normand <michel.mno@free.fr> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
With previous changes that allow to start a container without the need to create it; the lxc-ls was only reporting the created containers. With this patch, the lxc-ls is now reporting created and active containers. Signed-off-by:
Michel Normand <michel.mno@free.fr> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 24 Nov, 2009 3 commits
-
-
Michel Normand authored
Fix bad name parameter in the lxc-ps man page. Signed-off-by:
Michel Normand <michel.mno@free.fr> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
this state is reported when the lxc-freeze command was issued on the container. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
if, for some reason, openpty() fails, lxc_create_tty() will leak all previous ptys and leave the config structure in a inconsistent state (wrt the number of ptys actually opened) Fix that by explicitly closing all previously opened ptys in case of failure and by setting number of actually opened ttys after actual open Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 20 Nov, 2009 7 commits
-
-
Daniel Lezcano authored
Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
The configuration examples have been moved to doc/lxc/examples. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
Ensure that lxc.netdev.link is specified for macvlan interfaces, since it's required. While at it, simplify logic in instanciate_macvlan(): remove unnecessary-complicating goto statements (we only need to perform a cleanup in one place) Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
Before, a veth device pair required a link which was treated as a bridge device. Code crashed if there was no lxc.network.link specified. Fix that by allowing lxc.network.link to be unset Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
The container will be a directory where the user can store everything, so we create one directory and store a configuration file inside. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
With the previous modifications, a temporary directory is created to mount the rootfs in order to have the system container to remount itself the '/' directory. But in case of daemonize, we change the directory, so when the rootfs is specified with a relative path, we can not access it. Don't chdir, as that will be done automatically later in the chroot setup. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Update the man pages regarding the different modifications. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 19 Nov, 2009 7 commits
-
-
Michel Normand authored
Change Checkpoint / Restart API Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Remove checkpoint / restart dead code. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Display the 'rcfile' value on error Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
A mindless change to encapsulate a little more the function. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
in confile.c we currently have a ton of functions each doing the same thing. Clean them up by providing common routines to do the main work. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
struct lxc_netdev is used to hold information from cnfig file about a network device/configuration. Make the fields of this structure to be named similarily with the config file keywords, namely: s/ifname/link/ - host-side link for the device (bridge or eth0) s/newname/name/ - container-side ifname It is insane to have completely different names in config file and in structure/variable names :) Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Update the man pages regarding the modifications around the configuration option, volatile containers and new configuration file format. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 17 Nov, 2009 9 commits
-
-
Michel Normand authored
This function will be needed for the restart function. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
add capabilities for lxc-checkpoint Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
This is not required immidiately but may be used by other init. Signed-off-by:
Michel Normand <normand@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
The command specifies a configuration file => use it The command does not specify a configuration but the container was created before, use the configuration. The command does not specify a configuration and the container was not created before, use default. Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Andrian Nord authored
Typo ;) Signed-off-by:
Andrian Nord <NightNord@gmail.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
Instead of doing I/O one-byte-at-a-time in lxc_console, which is slow, let's do it in batches. Only for output (from container to the host system), since input is most likely one-byte-at-a-time anyway (from a keyboard). Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michael Tokarev authored
I noticed that container's consoles aren't quite useable (be it lxc-console or lxc-start with getty bound to /dev/console). The main problem is a complete lack of window resizing support: when I resize an xterm window with lxc-start or lxc-console, the "guest" does not know about that and continues to think that the terminal is 80x25 still. Is it just a lack of functionality (missing implementation) or something problematic? Ok, the attached patch fixes this. It moves the 'master' variable out of main function so it's accessible from the signal handler, sets up SIGWINCH handler to call a (newly created) winsz() function that gets the current tty size using TIOCGWINSZ ioctl and if that works, sets up the pty size using TIOCSWINSZ. That same function is called at the start as well, when setting up the signal handler. Signed-off-By:
Michael Tokarev <mjt@tls.msk.ru> Signed-off-By:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Andrian Nord authored
Maybe it will be more logical to keep configs into /etc/lxc/? Or, maybe, just use --with-config-path=/some/path switch into configure, which could be overridden as user wants to? Something like this one (in assumption, that this is up to user to create corresponding directory): Signed-off-by:
Andrian Nord <NightNord@gmail.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Cedric Le Goater authored
<lxc/lxc.h> should only include what is needed. This patch removes all useless headers from lxc.h and fixed other .c files. Signed-off-by:
Cedric Le Goater <clg@fr.ibm.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
- 13 Nov, 2009 4 commits
-
-
Michel Normand authored
without this correction, unable to create a container with a configuration file. This is a side effect of commit 48862401Signed-off-by:
Michel Normand <michel.mno@free.fr> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Daniel Lezcano authored
Recent changes around the configuration tree broke the current implementation of the lxc-netstat. Instead of retrieving the init_pid in the /var/lxc/<name>/..., pick one in the cgroup tasks list. There is still a restriction with this command making impossible to run it as non-root, any idea is welcome :( Signed-off-by:Daniel Lezcano <dlezcano@fr.ibm.com>
-
Andrian Nord authored
Patch moves etc/* contents into doc/examples/ and adds --disable-examples configure switch which may be used not to install examples. Default is to install them into ${docdir}/examples (commonly: /usr/share/doc/lxc/examples) Signed-off-by:Andrian Nord <NightNord@gmail.com> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-
Michel Normand authored
Signed-off-by:
Michel Normand <michel_mno@laposte.net> Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
-