aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix mount pathlxc-0.7.4.1Daniel Lezcano2011-03-141-1/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* lxc-0.7.4.1Daniel Lezcano2011-03-071-1/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* rename physical device to the original nameDaniel Lezcano2011-03-073-35/+31
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* factor out networking configuration codeDaniel Lezcano2011-03-073-84/+49
| | | | | | Change the name of the functions and factor some of them. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* lxc-0.7.4lxc-0.7.4Daniel Lezcano2011-02-261-1/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Update file capa detection for kernels >=2.6.37Jan Niehusmann2011-02-261-1/+1
| | | | | | | | The comment containing the version number at the beginning of the kernel config file changed its format with 2.6.37. This trivial patch makes the grep less specific, so it triggers for both formats. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Fixed a small typo in lxc-debian templateAmit Uttamchandani2011-02-191-1/+1
| | | | | | "udpate" should be "update" in configure_debian(). Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix lxc-checkpoint and lxc-restart sgml labelsRob Landley2011-02-172-3/+3
| | | | | | | | | | | | | | | | The patch fixes two build breaks in the sgml files: lxc-checkpoint.sgml.in Element Title in namespace '' encountered in refsect1, but no template matches. lxc-restart.sgml:58: parser error : AttValue: " or ' expected <arg choice=req><option>--name=<replaceable>NAME</replaceable></option></a Signed-off-by: Rob Landley <rlandley@parallels.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Simplify broadcast computationDaniel Lezcano2011-02-141-2/+3
| | | | | | | David Ward reported this computation could be written in a simpler way. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* update configuration wrt to the broadcast addressDaniel Lezcano2011-02-061-3/+5
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix broadcast computionDaniel Lezcano2011-02-062-4/+3
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix empty network configurationDaniel Lezcano2011-02-021-1/+1
| | | | | | The return statement is at the wrong place. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* lxc-start can output the console to a filelxc-0.7.4-rc1Daniel Lezcano2011-02-014-18/+51
| | | | | | Add the ability to specify a file to output the console. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* lxc-0.7.4-rc1Daniel Lezcano2011-02-011-1/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* take into account new configure option --with-linuxdirCedric Le Goater2011-02-012-2/+3
| | | | Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
* generate setns syscall numberClement Calmels2011-02-014-14/+89
| | | | | Signed-off-by: Clement Calmels <clement.calmels@fr.ibm.com> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
* lxc-attach gives a better error messageDaniel Lezcano2011-02-011-0/+6
| | | | | | Don't assume the user knows the kernel internals :) Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Fix paths in the lxc-busybox templateDaniel Lezcano2011-01-281-4/+4
| | | | | | | | | | | | | | | | | | | | Author of the patch : Jonathan Liu <???> posted as a bug fix on the lxc sourceforge website. OS: Arch Linux 32-bit /etc/init.d/rcS do not use full path to syslogd, mount and udhcpc executables. As busybox requires /proc mounted if CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" to run these commands without full path, the full path should be used in the startup script as /proc is mounted later in the script. It also fails to start the machine if /lib64 does not exist on the host system as there is a mount entry for /lib64 in the config. The attached patch changes commands in /etc/init.d/rcS to use full path and adds a check for /lib64 on host before adding lib64 mount entries to config. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* export env variable in lxc_startDaniel Lezcano2011-01-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's export the 'container' variable and let init receive it as a kernel command line option. In the upstart init scripts, we can distinguish if we are in a container context or not. =============================================================================== # /dev/console - getty # # This service maintains a getty on /dev/console from the point the # system is started until it is shut down again. # It only runs in lxc containers. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] env container pre-start script [ "x$container" != "xlxc" ] && { stop; exit 0; } exit 0; end script respawn exec /sbin/getty -8 38400 /dev/console =============================================================================== Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* suppress udev log outputDaniel Lezcano2011-01-232-0/+6
| | | | | | | | | | | We use udev within these containers and we prevent the /dev files to be created with the cgroup whitelist. So when the udevd receives the event from the kernel, it will fail to create some nodes in /dev and will spit error on the console. We set the log level to zero, so udev will silently fail. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Update ubuntu templatesSerge Hallyn2011-01-227-12/+597
| | | | | | | | | | | | | | | Rename 'ubuntu' template to 'lucid' Add new maverick and natty templates, which do much less tweaking of the environment. These should only be used on a kernel which supports sysfs tagging for /sys/class/net, as udev will be running in the container. The natty template needed to slightly change the installed packages for dhclient to be correclty installed. Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Adds correct file capa detection for >2.6.32 The kernel compile parameter ↵Reto Gantenbein2011-01-191-2/+4
| | | | | | was removed with kernel release 2.6.33 Since then file capabilities are enabled by default kernel commit: b3a222e52e4d4be77cc4520a57af1a4a0d8222d1 Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Only bring up network interface if IFF_UP is setDavid Ward2011-01-171-2/+2
| | | | | | | | Each network interface was brought up regardless of the configuration, as the wrong boolean operator was being used to test the IFF_UP flag. Signed-off-by: David Ward <david.ward@ll.mit.edu> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* set veth host's side always upDaniel Lezcano2011-01-171-7/+4
| | | | | | | | | We should always have the veth host's side up, otherwise if we omit the up flag in the configurationn, letting the container to configure its interface, the network will be never enabled as the host's side is not up. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Fix mntflags initializationJoerg Gollnick2011-01-161-0/+1
| | | | | | | | | | Dear all, while setting up a container on x86_64 (archlinux host/guest) I had trouble with mounting dev/pts and others from container.fstab and a ssh login does not work (only ssh container bash -i gives you a shell) The cause is that conf.c does not initialize mntflags. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* add lxc-lenny templateDaniel Lezcano2011-01-141-2/+2
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix clone_children pathDaniel Lezcano2011-01-131-2/+2
| | | | | | This line is at the wrong place ... Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* add missing template in MakefileDaniel Lezcano2011-01-132-0/+2
| | | | | | Missed to add lxc-lenny to the template. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix busybox inittab templateDaniel Lezcano2011-01-131-2/+2
| | | | | | | The inittab file format is wrong regarding how behaves busybox with this syntax. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* substitute the absolute rootfs mount pathDaniel Lezcano2011-01-131-10/+14
| | | | | | | | Change the mount point in the rootfs because we mount the rootfs in ROOTFSDIR for the pivot. We have to substitute the real mount path to the new path located in ROOTFSDIR. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* encapsulate mount point codeDaniel Lezcano2011-01-131-62/+107
| | | | | | | | | | | | Change the code to encapsulate the different mounts point. * mount on the host fs * mount relatively to the rootfs * mount absolutely to the rootfs (broken) That will make the code cleaner to fix the latter. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* mindless changes to conform indentationDaniel Lezcano2011-01-131-12/+16
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* set function staticDaniel Lezcano2011-01-131-2/+2
| | | | | | | Set the function prototype to static as it is not exported and used somewhere else in the code than this file. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix cgroup directory removalDaniel Lezcano2011-01-101-1/+1
| | | | | | Fix the name of the directory to remove. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* fix the ns_cgroup vs clone_childrenDaniel Lezcano2011-01-091-6/+76
| | | | | | | | | | | | | | | | | | The following patch fixes the bug where the clone_children compatibility flag is available with the ns_cgroup subsystem. The 2.6.37 kernel version should be the only one which is concerned by this modification, please refer to Documentation/feature-removal-schedule.txt and look for ns_cgroup. The problem is coming from we check for clone_children and we set it automatically and then we try to create a new cgroup. As the ns_cgroup is present the cgroup already exists and we are not allowed to attach our pid to a new cgroup. The next error will be when we try to create a new container because we enabled the clone_children flag and the ns_cgroup is present, it is not allowed by the kernel. The patch fix this by checking the mount options. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Correcting charset argument when calling locale-gen.Daniel Baumann2010-12-281-2/+2
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Correcting include argument when calling debootstrap.Daniel Baumann2010-12-281-1/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Disabling unneeded checkroot.sh initscript in debian template.Daniel Baumann2010-12-281-0/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Creating missing tty device nodes for squeeze in debian template.Daniel Baumann2010-12-281-0/+8
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Setting default mirror to cdn.debian.net in debian template.Daniel Baumann2010-12-281-1/+2
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Setting default suite to squeeze in debian template.Daniel Baumann2010-12-281-1/+1
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Duplicate lxc-debian to lxc-lennyDaniel Lezcano2010-12-281-0/+317
| | | | | | | Duplicate the lxc-debian template to use it as a fine grained template. Subject: Daniel Lezcano <dlezcano@fr.ibm.com>
* use clone_children cgroup's flagDaniel Lezcano2010-12-171-1/+74
| | | | | | | | If the ns_cgroup does not exist, we use the clone_children feature. Everytime a cgroup is created, we set this compatibility flag and we create the cgroup manually and add the child task to the cgroup. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Move common code to lxc_cgroup_createDaniel Lezcano2010-12-171-44/+38
| | | | | | | For both the ns_cgroup and the usual cgroup creation, we have to check if a previous does not exist and remove it if it is empty. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* encapsulate the ns_cgroupDaniel Lezcano2010-12-174-5/+15
| | | | | | | Create a single API to create a cgroup which will switch to the old ns_cgroup automatically. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Change nscgroup interfaceDaniel Lezcano2010-12-173-4/+4
| | | | | | Prepare the nscgroup to be converted to the clone_children changes. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Remove unused nscgroup fieldDaniel Lezcano2010-12-172-2/+1
| | | | | | This field is unused. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* remove duplicate cgroup headerDaniel Lezcano2010-12-171-1/+0
| | | | Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* Make mount paths relative to rootfsMichael Tokarev2010-12-171-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | Why not chdir into the root of container right when the root filesystem is (bind-)mounted, and let all mount entries to be relative to the container root? Even more, to warn if lxc.mount[.entry] contains absolute path for the destination directory (or a variation of this, absolute and does not start with container root mount point)? This way, all mounts will look much more sane, and it will be much easier to move/clone containers - by changing only lxc.rootfs. I do it this way locally since the beginning, by chdir'ing to the proper directory (rootfs) before running lxc-start (in a startup script), but this is now broken in 0.7.3 which bind-mounts rootfs somewhere in /usr/lib/lxc. Signed-off-by: Michael Tokarev<mjt@tls.msk.ru> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
* add support for dirsync mount optionSergey S. Kostyliov2010-10-301-0/+5
| | | | | | | | | | | | Add support for `dirsync' mount option. MS_DIRSYNC is on of the mount(2) mountflags so don't send it as extra mount option to avoid: lxc-start: Invalid argument - failed to mount ... errors. Signed-off-by: Sergey S. Kostyliov <rathamahata@gmail.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>