Commit Graph

3097 Commits

Author SHA1 Message Date
dlezcano
b2718c72a7 Factor out some code
From: Daniel Lezcano <daniel.lezcano@free.fr>

Factor out some code and especially the parsing of text file functions.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-16 10:22:49 +00:00
dlezcano
78ae2fcca0 Support block device for the rootfs
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Allow to specify a block device as the rootfs. The creation of the
container will try with brute force to determine the file system type.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-16 10:21:41 +00:00
dlezcano
44931bc727 Add more capabilities
From: Daniel Lezcano <daniel.lezcano@free.fr>

lxc-execute and lxc-create need capability to mount.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-16 10:19:27 +00:00
dlezcano
4c8ab83be6 Make use of realpath
From: Daniel Lezcano <daniel.lezcano@free.fr>

The realpath function is more convenient to build the absolute path of
the rootfs.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-16 10:14:34 +00:00
dlezcano
9b0f04774f Mount bind the rootfs directory
From: Daniel Lezcano <daniel.lezcano@free.fr>

Instead of using a symlink to the rootfs, just mount bind the rootfs
directory.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-16 10:13:15 +00:00
dlezcano
c952d1b915 Remove some pointless debian services
From: Daniel Lezcano <daniel.lezcano@free.fr>

Remove some debian services because they don't have sense in a container,
like the hw clock or the unmount of the file systems.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-16 10:11:03 +00:00
dlezcano
341a091c39 Update the man according new devpts instance
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Update the man page with the new devpts instance option.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-12 14:48:25 +00:00
dlezcano
3c26f34eab setup the new pts instance
From: Daniel Lezcano <dlezcano@fr.ibm.com>

The pts new instance is setup conforming the documentation in the
kernel sources, Documentation/filesystems/devpts.txt.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-12 14:48:04 +00:00
dlezcano
10db618d7d add the new pts instance configuration
From: Daniel Lezcano <dlezcano@fr.ibm.com>

This patch adds the configuration for a new pts instance.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-12 14:47:36 +00:00
dlezcano
db4aa207ce build a set of flags for the different enabled subsystems
From: Daniel Lezcano <dlezcano@fr.ibm.com>

When we want to check if a subsystem is enabled, we look at the
presence of a file/directory in the configuration tree files. That
works until we chroot into the rootfs. Some subsystem should be
preferably setup after the chrootfs, making the code simpler and
easier to read. So before setup the different subsystem, I build a
flags set and reuse it later to check if the subsystem is enabled or
not.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-12 14:47:10 +00:00
dlezcano
6c2b975b7d Add a TODO file
From: Daniel Lezcano <daniel.lezcano@free.fr>

The TODO file should be filled.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-12 14:46:54 +00:00
dlezcano
45e2df30c1 add missing ifupdown package to debootstrap
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the ifupdown missing package.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-09 17:11:24 +00:00
dlezcano
2f997019d0 Update lxc-debian to use the lenny release
From: Matt Helsley <matthltc@us.ibm.com>

With the release of lenny nearing this patch may soon be useful.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-09 17:10:52 +00:00
dlezcano
49b93bbfb8 Create the m4 directory if it does not exist
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Create the m4 directory if it does not exist

Reported-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-09 17:10:02 +00:00
dlezcano
8524810714 handle interruption/failure of lxc-debian more gracefully
From: Matt Helsley <matthltc@us.ibm.com>

If lxc-debian fails or is interrupted during debootstrap then the next
invocation of lxc-debian breaks because it only checks for the existence
of the directory. This forces the user to remove the cache by hand to
retry the create step.

Let's allow the user to re-run lxc-debian to resume/retry. Store the
cache in a partial-$ARCH directory until debootstrap succeeds. Then move
the valid cache to its final destination.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-05 12:03:47 +00:00
dlezcano
ff218c25da Add signalfd function definition
From: Dietmar Maurer <dietmar@proxmox.com>

The signalfd function prototype and the signalfd header file is not
defined in the debian Lenny. We want to use this debian version with a
newer kernel.

This patch gives the signalfd function prototype, because the function is
available in the glibc-2.7 which is the version coming with debian Lenny.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-02 14:50:00 +00:00
dlezcano
dc21287c4d Complete use of autoconf prefix in lxc-debian
From: Matt Helsley <matthltc@us.ibm.com>

The lxc-debian script does not consistently address the lxc lock as
@LOCALSTATEDIR@/lock/subsys/lxc. Make consistent use of the autotools
substitution to completely enable configure --prefixes.

I also added a comment explaining why some of the paths didn't need
autoconf substitutions for anyone who wants to understand the script.
Also, to separate it from the container contents proper, I moved the
CACHE variable initialization above the container-internal path
variables.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-29 10:50:28 +00:00
dlezcano
79cf945c06 From: Daniel Lezcano <daniel.lezcano@free.fr>
This modification removes the tty configuration file and makes the tty
to be usable with the local tty.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-28 16:33:55 +00:00
dlezcano
64870cda2a Fixed bad variable type
From: Daniel Lezcano <daniel.lezcano@free.fr>

Fixed the type of the opt variable. On the powerpc architecture, that leads
to an infinite loop in the getopt inspection because getopt returns 255
instead of -1 as expected. The opt variable should be an int and not a char.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-26 19:43:46 +00:00
dlezcano
6b621e0318 From: Daniel Lezcano <daniel.lezcano@free.fr>
Removed usage of the release script.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-26 08:33:08 +00:00
dlezcano
8d8370a5ef Remove the release script
From: Daniel Lezcano <daniel.lezcano@free.fr>

Removed the release.sh script which is not in the right place in this source
tree.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-26 08:31:52 +00:00
dlezcano
5129b10319 Fixed type in the spec file
From: Daniel Lezcano <daniel.lezcano@free.fr>

Removed typo.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-26 08:25:30 +00:00
dlezcano
cf445de362 Check the kernel feature
From: Daniel Lezcano <daniel.lezcano@free.fr>

The virtual devices are automatically destroyed when the network namespace
dies for the kernel version >= 2.6.29. Until this version the network devices
have to be destroyed by lxc. This modification checks the version of the
kernel to make lxc to destroy the network devices or not.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-25 23:29:24 +00:00
dlezcano
cef07149cd Reduce spec file
From: Daniel Lezcano <daniel.lezcano@free.fr>

Simplified the spec file

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-25 23:27:00 +00:00
dlezcano
b0a33c1eb6 From: Daniel Lezcano <daniel.lezcano@free.fr>
Console support for the system container.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-25 21:52:38 +00:00
dlezcano
2b3b608310 From: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-25 21:15:46 +00:00
dlezcano
4e2121f525 Remove nsgroup directory when the container dies
From: Daniel Lezcano <daniel.lezcano@free.fr>

Remove the nsgroup directory when the container dies, otherwise this will
lead to an error when the pids number are recycled

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-18 21:49:56 +00:00
dlezcano
80a992f719 Comment out the script debug mode
From: Daniel Lezcano <daniel.lezcano@free.fr>

Suppress debug mode in the script

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-18 21:47:55 +00:00
dlezcano
a6f2de7e5e more info on failure to create directory
From: Amy Griffis <amy.griffis@hp.com>

Add error handling similar to remove_lxc_directory().

Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-08 08:30:58 +00:00
dlezcano
91feede190 Conform to rpmlint
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Fix rpmlint warnings.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-05 22:06:21 +00:00
dlezcano
007c98a320 Increment minor version
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Increment minor version

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-05 21:57:01 +00:00
dlezcano
845eac4b88 Create the localstatedir when installing the commands
From: Daniel Lezcano <dlezcano@fr.ibm.com>

For some distros (eg. opensuse), when installing with "make install", the
localstatedir is not created. This modification makes this directory to be
created at the install time.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-05 19:19:46 +00:00
dlezcano
eec659c0eb Ignore files copied by libtool
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Ignore files copied by libtool

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-05 19:17:02 +00:00
dlezcano
84701151f0 Add freezer compatibility for older interface
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Different interface exists for the freezer, "RUNNING" or "THAWED" should
be written to the freezer file, so in case "THAWED", we fall back to
"RUNNING". That allows to support older freezer kernel interface for 2.6.27.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-05 18:36:23 +00:00
dlezcano
952be76a13 *** empty log message *** 2009-01-05 12:17:44 +00:00
dlezcano
d3e00ade76 Remove files provided by libtool and automake
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Remove the files which are provided by libtool and automake.
libtoolize has been added to 'bootstrap' command.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-05 12:08:14 +00:00
dlezcano
46105d2d1d Removed pointless file
From: Michel Normand <michel.mno@free.fr>

I do not understand the purpose of this file in the doc/ subdir
seems to be useless.

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-14 20:26:47 +00:00
dlezcano
892bd61e0f Add Frequently Asked Question to dist tarball
From: Michel Normand <michel.mno@free.fr>

Add FAQ to the dist tarball.

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-14 20:24:33 +00:00
dlezcano
a340b3fc00 Add more to cvsignore
From: Michel Normand <michel_mno@laposte.net>

Add more files to .cvsignore, especially the new created files.

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-13 12:32:11 +00:00
dlezcano
1099808017 Describe Ubuntu 8.10 vs libtool problem
From: Michel Normand <michel_mno@laposte.net>

Add an entry in the FAQ about libtool problem on Ubuntu 8.10

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-13 12:19:29 +00:00
dlezcano
7afc269d0e Enforce selinux to disabled
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Enforce selinux to disabled

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 17:58:29 +00:00
dlezcano
35f549fe1b Check the libpcap devel is installed
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Check the libpcap devel is installed

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 17:49:21 +00:00
dlezcano
063880115c Improve the lxc-debian script
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Changed the lxc-debian script to accept empty password for
ssh connection, and to not share the /dev directory with the
system.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 17:39:58 +00:00
dlezcano
ed502555f4 Change access mount and check on the console
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Changed to access the console to the rootfs directly.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 17:38:18 +00:00
dlezcano
719c46e12b Allow to use /dev/ptmx
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added /dev/ptmx to the devices.allow list.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 10:35:37 +00:00
dlezcano
94d12f0aad Enqueue cgroup value in the right order
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Use the list_add_tail function to add the elements at the end of the list
so when the cgroup elements are setup, they will be stored in the file
in the right order.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 09:43:15 +00:00
dlezcano
da9e3794b5 Allows to enqueue list element instead of pushing on top of the list
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the list_add_tail function to add an element at the end of the list.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 09:41:47 +00:00
dlezcano
85cbaa06f9 Add cgroup devices whitelist for the debian
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added thed cgroup whitelist configuration for a debian container.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-09 09:39:49 +00:00
dlezcano
053567ec77 A faq file.
From: Michel Normand <michel_mno@laposte.net>

The FAQ file to be filled.

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-08 17:21:21 +00:00
dlezcano
0d5c3f956d Version 0.5.0 2008-12-03 21:34:45 +00:00