| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
| |
Change the name of the functions and factor some of them.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
"udpate" should be "update" in configure_debian().
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
David Ward reported this computation could be written in a simpler
way.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
| |
The return statement is at the wrong place.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
| |
Add the ability to specify a file to output the console.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
|
|
|
|
|
| |
Signed-off-by: Clement Calmels <clement.calmels@fr.ibm.com>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
|
|
|
|
|
|
| |
Don't assume the user knows the kernel internals :)
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
| |
This line is at the wrong place ...
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
| |
Missed to add lxc-lenny to the template.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
| |
The inittab file format is wrong regarding how behaves busybox with
this syntax.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
| |
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 the name of the directory to remove.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
| |
Duplicate the lxc-debian template to use it as a fine grained
template.
Subject: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Prepare the nscgroup to be converted to the clone_children changes.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
| |
This field is unused.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
| |
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|