]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
15 years agoAdd more capabilities
dlezcano [Mon, 16 Feb 2009 10:19:27 +0000 (10:19 +0000)]
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>
15 years agoMake use of realpath
dlezcano [Mon, 16 Feb 2009 10:14:34 +0000 (10:14 +0000)]
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>
15 years agoMount bind the rootfs directory
dlezcano [Mon, 16 Feb 2009 10:13:15 +0000 (10:13 +0000)]
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>
15 years agoRemove some pointless debian services
dlezcano [Mon, 16 Feb 2009 10:11:03 +0000 (10:11 +0000)]
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>
15 years agoUpdate the man according new devpts instance
dlezcano [Thu, 12 Feb 2009 14:48:25 +0000 (14:48 +0000)]
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>
15 years agosetup the new pts instance
dlezcano [Thu, 12 Feb 2009 14:48:04 +0000 (14:48 +0000)]
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>
15 years agoadd the new pts instance configuration
dlezcano [Thu, 12 Feb 2009 14:47:36 +0000 (14:47 +0000)]
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>
15 years agobuild a set of flags for the different enabled subsystems
dlezcano [Thu, 12 Feb 2009 14:47:10 +0000 (14:47 +0000)]
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>
15 years agoAdd a TODO file
dlezcano [Thu, 12 Feb 2009 14:46:54 +0000 (14:46 +0000)]
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>
15 years agoadd missing ifupdown package to debootstrap
dlezcano [Mon, 9 Feb 2009 17:11:24 +0000 (17:11 +0000)]
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>
15 years agoUpdate lxc-debian to use the lenny release
dlezcano [Mon, 9 Feb 2009 17:10:52 +0000 (17:10 +0000)]
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>
15 years agoCreate the m4 directory if it does not exist
dlezcano [Mon, 9 Feb 2009 17:10:02 +0000 (17:10 +0000)]
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>
15 years agohandle interruption/failure of lxc-debian more gracefully
dlezcano [Thu, 5 Feb 2009 12:03:47 +0000 (12:03 +0000)]
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>
15 years agoAdd signalfd function definition
dlezcano [Mon, 2 Feb 2009 14:50:00 +0000 (14:50 +0000)]
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>
15 years agoComplete use of autoconf prefix in lxc-debian
dlezcano [Thu, 29 Jan 2009 10:50:28 +0000 (10:50 +0000)]
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>
15 years agoFrom: Daniel Lezcano <daniel.lezcano@free.fr>
dlezcano [Wed, 28 Jan 2009 16:33:55 +0000 (16:33 +0000)]
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>
15 years agoFixed bad variable type
dlezcano [Mon, 26 Jan 2009 19:43:46 +0000 (19:43 +0000)]
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>
15 years agoFrom: Daniel Lezcano <daniel.lezcano@free.fr>
dlezcano [Mon, 26 Jan 2009 08:33:08 +0000 (08:33 +0000)]
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>
15 years agoRemove the release script
dlezcano [Mon, 26 Jan 2009 08:31:52 +0000 (08:31 +0000)]
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>
15 years agoFixed type in the spec file
dlezcano [Mon, 26 Jan 2009 08:25:30 +0000 (08:25 +0000)]
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>
15 years agoCheck the kernel feature
dlezcano [Sun, 25 Jan 2009 23:29:24 +0000 (23:29 +0000)]
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>
15 years agoReduce spec file
dlezcano [Sun, 25 Jan 2009 23:27:00 +0000 (23:27 +0000)]
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>
15 years agoFrom: Daniel Lezcano <daniel.lezcano@free.fr>
dlezcano [Sun, 25 Jan 2009 21:52:38 +0000 (21:52 +0000)]
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>
15 years agoFrom: Daniel Lezcano <daniel.lezcano@free.fr>
dlezcano [Sun, 25 Jan 2009 21:15:46 +0000 (21:15 +0000)]
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>
15 years agoRemove nsgroup directory when the container dies
dlezcano [Sun, 18 Jan 2009 21:49:56 +0000 (21:49 +0000)]
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>
15 years agoComment out the script debug mode
dlezcano [Sun, 18 Jan 2009 21:47:55 +0000 (21:47 +0000)]
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>
15 years agomore info on failure to create directory
dlezcano [Thu, 8 Jan 2009 08:30:58 +0000 (08:30 +0000)]
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>
15 years agoConform to rpmlint
dlezcano [Mon, 5 Jan 2009 22:06:21 +0000 (22:06 +0000)]
Conform to rpmlint

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Fix rpmlint warnings.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoIncrement minor version
dlezcano [Mon, 5 Jan 2009 21:57:01 +0000 (21:57 +0000)]
Increment minor version

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Increment minor version

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoCreate the localstatedir when installing the commands
dlezcano [Mon, 5 Jan 2009 19:19:46 +0000 (19:19 +0000)]
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>
15 years agoIgnore files copied by libtool
dlezcano [Mon, 5 Jan 2009 19:17:02 +0000 (19:17 +0000)]
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>
15 years agoAdd freezer compatibility for older interface
dlezcano [Mon, 5 Jan 2009 18:36:23 +0000 (18:36 +0000)]
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>
15 years ago*** empty log message ***
dlezcano [Mon, 5 Jan 2009 12:17:44 +0000 (12:17 +0000)]
*** empty log message ***

15 years agoRemove files provided by libtool and automake
dlezcano [Mon, 5 Jan 2009 12:08:14 +0000 (12:08 +0000)]
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>
15 years agoRemoved pointless file
dlezcano [Sun, 14 Dec 2008 20:26:47 +0000 (20:26 +0000)]
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>
15 years agoAdd Frequently Asked Question to dist tarball
dlezcano [Sun, 14 Dec 2008 20:24:33 +0000 (20:24 +0000)]
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>
15 years agoAdd more to cvsignore
dlezcano [Sat, 13 Dec 2008 12:32:11 +0000 (12:32 +0000)]
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>
15 years agoDescribe Ubuntu 8.10 vs libtool problem
dlezcano [Sat, 13 Dec 2008 12:19:29 +0000 (12:19 +0000)]
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>
15 years agoEnforce selinux to disabled
dlezcano [Tue, 9 Dec 2008 17:58:29 +0000 (17:58 +0000)]
Enforce selinux to disabled

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Enforce selinux to disabled

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoCheck the libpcap devel is installed
dlezcano [Tue, 9 Dec 2008 17:49:21 +0000 (17:49 +0000)]
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>
15 years agoImprove the lxc-debian script
dlezcano [Tue, 9 Dec 2008 17:39:58 +0000 (17:39 +0000)]
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>
15 years agoChange access mount and check on the console
dlezcano [Tue, 9 Dec 2008 17:38:18 +0000 (17:38 +0000)]
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>
15 years agoAllow to use /dev/ptmx
dlezcano [Tue, 9 Dec 2008 10:35:37 +0000 (10:35 +0000)]
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>
15 years agoEnqueue cgroup value in the right order
dlezcano [Tue, 9 Dec 2008 09:43:15 +0000 (09:43 +0000)]
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>
15 years agoAllows to enqueue list element instead of pushing on top of the list
dlezcano [Tue, 9 Dec 2008 09:41:47 +0000 (09:41 +0000)]
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>
15 years agoAdd cgroup devices whitelist for the debian
dlezcano [Tue, 9 Dec 2008 09:39:49 +0000 (09:39 +0000)]
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>
15 years agoA faq file.
dlezcano [Mon, 8 Dec 2008 17:21:21 +0000 (17:21 +0000)]
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>
15 years agoVersion 0.5.0
dlezcano [Wed, 3 Dec 2008 21:34:45 +0000 (21:34 +0000)]
Version 0.5.0

15 years agoExpand the configure directory
dlezcano [Mon, 1 Dec 2008 11:50:43 +0000 (11:50 +0000)]
Expand the configure directory

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Expand the configure variable specifying the directories in order to use
them directly in the scripts.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix some typos
dlezcano [Mon, 1 Dec 2008 11:05:07 +0000 (11:05 +0000)]
Fix some typos

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Fix some typos.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years ago*** empty log message ***
dlezcano [Sun, 30 Nov 2008 15:33:10 +0000 (15:33 +0000)]
*** empty log message ***

15 years ago*** empty log message ***
dlezcano [Sun, 30 Nov 2008 08:10:47 +0000 (08:10 +0000)]
*** empty log message ***

15 years agoAdded Makefile file
dlezcano [Sun, 30 Nov 2008 08:08:31 +0000 (08:08 +0000)]
Added Makefile file

15 years agoAdded a script directory for containers creation helper scripts
dlezcano [Fri, 28 Nov 2008 15:36:51 +0000 (15:36 +0000)]
Added a script directory for containers creation helper scripts

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added a directory called 'scripts' where is stored two helpers.
The first one allows to create a mini debian container and the
second one to create a sshd container.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdded lxc-debian command
dlezcano [Thu, 27 Nov 2008 22:09:56 +0000 (22:09 +0000)]
Added lxc-debian command

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the script lxc-debian to the package.
This command allows to debootstrap a debian minimal and configure a container
to run it. Several debian can be installed by invoking the command with a
different container name.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdded plugin header
dlezcano [Wed, 26 Nov 2008 17:38:36 +0000 (17:38 +0000)]
Added plugin header

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the plugin header for the checkpoint/restart.
That will allow to integrate different CR solutions.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoMake the script to call itself.
dlezcano [Wed, 26 Nov 2008 17:36:54 +0000 (17:36 +0000)]
Make the script to call itself.

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Make the script to call itself, so we can unshare the mount points safely,
they will be automatically unmounted when the command finish.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd the more simple utility to unshare the namespaces.
dlezcano [Wed, 26 Nov 2008 17:34:52 +0000 (17:34 +0000)]
Add the more simple utility to unshare the namespaces.

From: Daniel Lezcano <dlezcano@fr.ibm.com>

lt-lxc-unshare <options> [command]
Options are:
 -f      : fork and unshare (automatic when unsharing the pids)
 -m      : unshare the mount points
 -p      : unshare the pids
 -h      : unshare the utsname
 -i      : unshare the sysv ipc
 -n      : unshare the network
 -u <id> : unshare the users and set a new id
 if -f or -p is specified, <command> is mandatory)

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd sys admin capabilty to lxc-netstat to mount /proc/net
dlezcano [Wed, 26 Nov 2008 17:32:16 +0000 (17:32 +0000)]
Add sys admin capabilty to lxc-netstat to mount /proc/net

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add sys admin capability to lxc-netstat to mount /proc/net.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoRemove annoying compilation message
dlezcano [Wed, 26 Nov 2008 17:08:00 +0000 (17:08 +0000)]
Remove annoying compilation message

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Remove annoying compilation message

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix compilation error
dlezcano [Wed, 26 Nov 2008 17:06:19 +0000 (17:06 +0000)]
Fix compilation error

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Remove ';' symbol at the end of the macro.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoRemove annoying warnings and fix tty for restart
dlezcano [Wed, 26 Nov 2008 17:05:11 +0000 (17:05 +0000)]
Remove annoying warnings and fix tty for restart

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Remove annoying compilation messages and fix tty for the restart.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd read permission checking for the container
dlezcano [Tue, 25 Nov 2008 17:01:56 +0000 (17:01 +0000)]
Add read permission checking for the container

From: Daniel Lezcano <dlezcano@fr.ibm.com>

When an user tries to look at the pids or network information belonging
to a container not owned by the user. The command silently fails, I changed
that to check the read permission, display an error and exit.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd more options for the mount points
dlezcano [Tue, 25 Nov 2008 16:57:24 +0000 (16:57 +0000)]
Add more options for the mount points

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the readonly and noexec options for the mount points.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc: minimal C/R plugin
dlezcano [Tue, 25 Nov 2008 13:02:29 +0000 (13:02 +0000)]
lxc: minimal C/R plugin

From: Cedric Le Goater <clg@fr.ibm.com>

Plugin for columbia CR.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
15 years agoPass the ttyname to the lxc_setup function
dlezcano [Tue, 25 Nov 2008 13:00:49 +0000 (13:00 +0000)]
Pass the ttyname to the lxc_setup function

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Retrieve the ttyname and pass it to the lxc_setup function.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd the framework for a console
dlezcano [Tue, 25 Nov 2008 12:58:21 +0000 (12:58 +0000)]
Add the framework for a console

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the setup information to create a console. This temporary code will
be improved to take into account ttys and console.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdded the console error value
dlezcano [Tue, 25 Nov 2008 12:51:52 +0000 (12:51 +0000)]
Added the console error value

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the console error value

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoRemove nsgroup link when destroying the container
dlezcano [Tue, 25 Nov 2008 12:50:20 +0000 (12:50 +0000)]
Remove nsgroup link when destroying the container

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Remove nsgroup link when destroying the container

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix some typos
dlezcano [Tue, 25 Nov 2008 12:49:14 +0000 (12:49 +0000)]
Fix some typos

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Fixed some typos in the man pages

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdded missing lxc.7 man page
dlezcano [Mon, 24 Nov 2008 10:36:18 +0000 (10:36 +0000)]
Added missing lxc.7 man page

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the file lxc.sgml.in to the repository.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoHard code localstatedir in the scripts. pkgconfig is too difficult to handle
dlezcano [Fri, 21 Nov 2008 18:20:48 +0000 (18:20 +0000)]
Hard code localstatedir in the scripts. pkgconfig is too difficult to handle
between 32bits and 64bits architecture and different pkgconfig conflict.

15 years agoAdd a netstat per container
dlezcano [Fri, 21 Nov 2008 18:19:36 +0000 (18:19 +0000)]
Add a netstat per container

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the ability to do netstat from outside of the container to see
network resources used by the container.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoRemove lxc.pc pkgconfig usage
dlezcano [Fri, 21 Nov 2008 18:17:38 +0000 (18:17 +0000)]
Remove lxc.pc pkgconfig usage

15 years agoFixed a typo
dlezcano [Fri, 21 Nov 2008 18:16:39 +0000 (18:16 +0000)]
Fixed a typo

15 years agoReturn error code in child process
dlezcano [Fri, 21 Nov 2008 15:56:38 +0000 (15:56 +0000)]
Return error code in child process

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Return the error code when the exec fails in the child process, that
decreases the granularity of the error given to the user.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoUse pkgconfig to retrieve localstatedir
dlezcano [Thu, 20 Nov 2008 19:57:47 +0000 (19:57 +0000)]
Use pkgconfig to retrieve localstatedir

From: Matt Helsley <matthltc@us.ibm.com>

Use the pkgconfig to locate in the lxc scripts the place where .../var/lxc
is.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoDisable test compilation by default
dlezcano [Thu, 20 Nov 2008 17:06:02 +0000 (17:06 +0000)]
Disable test compilation by default

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Disable the test programs compilation by default in order to reduce the
compilation time when generating rpm and dist.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoMake the README file a copy of lxc.7
dlezcano [Thu, 20 Nov 2008 15:08:22 +0000 (15:08 +0000)]
Make the README file a copy of lxc.7

From: Daniel Lezcano <dlezcano@fr.ibm.com>

The man lxc.7 being complete enough, I copy the man to the README file.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd lxc.7 man page
dlezcano [Thu, 20 Nov 2008 15:04:09 +0000 (15:04 +0000)]
Add lxc.7 man page

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the overview man page for lxc.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdded the man page lxc.conf.5
dlezcano [Wed, 19 Nov 2008 16:58:09 +0000 (16:58 +0000)]
Added the man page lxc.conf.5

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the man page for the lxc.conf configuration file.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agochanged /var location
legoater [Wed, 19 Nov 2008 11:08:06 +0000 (11:08 +0000)]
changed /var location

From: Cedric Le Goater <clg@fr.ibm.com>

changed /var location

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
15 years agofixed readlink to add an ending '\0'
legoater [Wed, 19 Nov 2008 11:05:42 +0000 (11:05 +0000)]
fixed readlink to add an ending '\0'

From: Cedric Le Goater <clg@fr.ibm.com>

fixed readlink to add an ending '\0'

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
15 years agoAdd the lxc-cgroup man page
dlezcano [Tue, 18 Nov 2008 14:27:12 +0000 (14:27 +0000)]
Add the lxc-cgroup man page

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the lxc-cgroup man page

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoGenerate only if docbook is installed
dlezcano [Tue, 18 Nov 2008 14:03:57 +0000 (14:03 +0000)]
Generate only if docbook is installed

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Generate the man pages only if the docbook tool is available.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdded the man.1 pages
dlezcano [Tue, 18 Nov 2008 13:45:49 +0000 (13:45 +0000)]
Added the man.1 pages

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the different man pages for the lxc commands. The generation of the
man pages relies on the docbook tool.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoList the available containers and the processes belonging to such container.
dlezcano [Tue, 18 Nov 2008 09:40:05 +0000 (09:40 +0000)]
List the available containers and the processes belonging to such container.

From: Daniel Lezcano <dlezcano@fr.ibm.com>

This modification change the lxc-ps command and adds the lxc-ls command.

The lxc-ps command takes the container name argument and shows the processes
belonging to the specified container. The usual ps argument can be passed to
the lxc-ps to change the output.
Examples:
  lxc-ps -n foo --forest
  lxc-ps -n foo -o pid=

The lxc-ls command list the container name available on the system. This is
useful to retrieve information for each container.
Examples:
  for i in $(lxc-ls); do
lxc-info -n $i
lxc-ps -n $i --forest
  done

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoReturn a lxc-error for creation and starting
dlezcano [Mon, 17 Nov 2008 18:22:29 +0000 (18:22 +0000)]
Return a lxc-error for creation and starting

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Return a lxc-error when for the lxc_configure and lxc_setup function.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoHandle the lock error and show message to user
dlezcano [Mon, 17 Nov 2008 17:55:49 +0000 (17:55 +0000)]
Handle the lock error and show message to user

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Handle the lock error and show message to user.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd return error status in the different functions
dlezcano [Mon, 17 Nov 2008 16:01:34 +0000 (16:01 +0000)]
Add return error status in the different functions

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the most known error to the different API to be followed up by the
caller, so we can later show a better message to the user when something
goes wrong. The error catching is coarse grain right now but will be improved,
step by step.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd error status for the API
dlezcano [Mon, 17 Nov 2008 15:18:19 +0000 (15:18 +0000)]
Add error status for the API

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the error codes and the corresponding strings to the liblxc, so
the error raised to the user can be more understandable.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoDo some cleanup in the lxc.h file
dlezcano [Mon, 17 Nov 2008 14:24:07 +0000 (14:24 +0000)]
Do some cleanup in the lxc.h file

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Do some cleanup in the lxc.h file, remove dead code and move definition to
the right place.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoRemove the kill container processes code
dlezcano [Mon, 17 Nov 2008 14:15:40 +0000 (14:15 +0000)]
Remove the kill container processes code

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Remove the kill container processes code because it can be implemented with
a very few scripting lines

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoSetup the control group
dlezcano [Mon, 17 Nov 2008 13:55:01 +0000 (13:55 +0000)]
Setup the control group

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Setup the control group when executing the container.
Remove the dead code.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoChange at compilation time the destruction of the network devices
dlezcano [Fri, 14 Nov 2008 16:16:35 +0000 (16:16 +0000)]
Change at compilation time the destruction of the network devices

From: Daniel Lezcano <dlezcano@fr.ibm.com>

The future kernel version will automatically autodestroy the network devices
when the network namespace exits. This is not the case for the current version.
In order to handle the both cases, I added a configuration option to disable
the network destruction when the container exits:
--disable-network-destroy

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix cgroup configuration format
dlezcano [Fri, 14 Nov 2008 15:42:59 +0000 (15:42 +0000)]
Fix cgroup configuration format

From: Daniel Lezcano <dlezcano@fr.ibm.com>

This modification change the configuration format. Instead of creating
a 'cgroup' directory with a file per controller, a single file is used
to store the different value for the control groups. That allows to assign
several values to the same controller like "devices.allow" and keep the same
assignation order as defined in the configuration.

In order to keep compatibility, when the old cgroup format is detected, it
is automatically converted to the new format.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoDefault command is "/sbin/init" for lxc-start
dlezcano [Fri, 14 Nov 2008 15:35:40 +0000 (15:35 +0000)]
Default command is "/sbin/init" for lxc-start

From: Daniel Lezcano <dlezcano@fr.ibm.com>

When no command is specified is specified for lxc-start, the "/sbin/init"
is automatically used.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd setpcap capabilty to be able to drop the sys_boot capabilty.
dlezcano [Thu, 13 Nov 2008 16:53:23 +0000 (16:53 +0000)]
Add setpcap capabilty to be able to drop the sys_boot capabilty.

From: Daniel Lezcano <dlezcano@fr.ibm.com>

Previously, we dropped the CAP_SYS_BOOT capabilty. Unfortunatly if we are
non root user, we are not able to do that. So I had the CAP_SETPCAP to
lxc-execute and lxc-start command line to remove this capabilty.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix function prototype
dlezcano [Thu, 13 Nov 2008 15:23:44 +0000 (15:23 +0000)]
Fix function prototype

From: Daniel Lezcano <dlezcano@fr.ibm.com>

The lxc_start function prototype has been changed.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoReplace lxc_execute by an intermediate lxc_init
dlezcano [Thu, 13 Nov 2008 15:21:55 +0000 (15:21 +0000)]
Replace lxc_execute by an intermediate lxc_init

From: Daniel Lezcano <dlezcano@fr.ibm.com>

The main difference between lxc_start and lxc_execute is the latter creates
an intermediate process to wait for all the childs. That allows to support
daemons or orphan process group for the pid namespace.

Having such difference makes the code to be duplicate between the two
functions. So instead of doing this, I create an intermediate <init> program
which is in charge to launch the specified command. This command is the
lxc-init program taking different options:
 --mount-procfs : mount the proc filesystem before exec'ing the command
 --mount-sysfs : mount the sys filesystem before exec'ing the command

A double dash indicates the end of the options of lxc-init and the beginning
of the command to be launched.

To summarize:
 * lxc_execute function is no more.
 * lxc-execute command uses the lxc_start function and launch the specified
command via lxc-init

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>