]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
15 years agocleanup log.h
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
cleanup log.h

Rename lxc_log.h to log.h

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
15 years agocleanup conf.h
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
cleanup conf.h

Rename lxc_conf.h to conf.h

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
15 years agocleanup cgroup.h
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
cleanup cgroup.h

Rename lxc_cgroup.h to cgroup.h

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
15 years agocleanup lock.h
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
cleanup lock.h

Rename lxc_lock.h to lock.h

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
15 years agocleanup namespace.h
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
cleanup namespace.h

Rename lxc_namespace.h to namespace.h

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
15 years agoUse 'uname -m' instead of arch
Ryousei Takano [Fri, 27 Mar 2009 04:50:34 +0000 (13:50 +0900)]
Use 'uname -m' instead of arch

'uname -m' seems to be more general to get the machine's architecture
type.  Ubunbu 8.10 (and also all debian based distros?) does not have
arch(1).

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd mtu option setting for lxc-fedora
Ryousei Takano [Thu, 26 Mar 2009 10:21:44 +0000 (19:21 +0900)]
Add mtu option setting for lxc-fedora

This patch adds the mtu option setting for the lxc-fedora script.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd mtu option setting for lxc-debian
Ryousei Takano [Thu, 26 Mar 2009 10:21:42 +0000 (19:21 +0900)]
Add mtu option setting for lxc-debian

This patch adds the mtu option setting for the lxc-debian script.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoset the mtu before attaching to the bridge
Daniel Lezcano [Thu, 26 Mar 2009 10:32:23 +0000 (11:32 +0100)]
set the mtu before attaching to the bridge

"I checked lxc-0.6.1 and your commit 75d09f83b82f35a610f4922e06ad897692062fab
(set mtu for netdev).

I found a problem of the MTU size of br0.  In the current code,
device_set_mtu() is
called after bridge_attach(), so the MTU size of br0 is set to the
default MTU size
of veth0 (i.e., 1500 bytes).
This causes performance degradation as I reported.

We need to modify to call device_set_mtu() before bridge_attach()"

Now that we have the network functions accessible, do not longer
use the lxc_configure_veth, lxc_configure_macvlan and split
the configuration of the veth in order to create it, configure it
and finally attach it to the bridge.

Reported-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: Ryousei Takano <takano-ryousei@aist.go.jp>
15 years agochange the api to export the network functions
Daniel Lezcano [Thu, 26 Mar 2009 10:32:22 +0000 (11:32 +0100)]
change the api to export the network functions

The network functions are too encapsulated and do not allow
flexibility. Export all these api and prepare the changes for the
next patch to set the mtu.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: Ryousei Takano <takano-ryousei@aist.go.jp>
15 years agoFix trivial stuff for mtu option setting
Ryousei Takano [Wed, 25 Mar 2009 15:57:12 +0000 (00:57 +0900)]
Fix trivial stuff for mtu option setting

Hi Daniel,

This patch removes unused variable 'strmtu' and fix an incorrect variable name.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoincrement minor version number
Daniel Lezcano [Tue, 24 Mar 2009 17:31:23 +0000 (18:31 +0100)]
increment minor version number

increment the minor version number for the next release

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoUse a specific script to set the capabilities
Daniel Lezcano [Tue, 24 Mar 2009 12:56:37 +0000 (13:56 +0100)]
Use a specific script to set the capabilities

Instead of having the capabilities to be set automatically,
it will be up to the user to set them through a specific
script 'lxc-setcap'.

After installing the lxc tools, if we want them to be available,
for a non-root user, lxc-setcap will set the needed capabilities.
If, after thinking it, we want to remove the capabilities,
the 'lxc-setcap -d' will do this for us.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: Guido Trotter <ultrotter@google.com>
15 years agoset mtu for netdev
Daniel Lezcano [Sun, 22 Mar 2009 21:52:17 +0000 (22:52 +0100)]
set mtu for netdev

When setting the mtu size at the veth creation, the mtu is only set
on one side of the veth tunnel, the one attached to the bridge.

I changed a little the code and added the device_set_mtu function so
it is called after the veth has been created on both side.

That moves the mtu veth specific code inside the veth function creation.

Hopefully this code could be reused later for different future network
configuration (eg. ip tunnel).

The mtu option will be simply ignored in case of macvlan network configuration
because the macvlan network device inherit the mtu of the physical link.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd lxc.network.mtu configuration (resend)
Takano Ryousei [Sat, 21 Mar 2009 19:52:00 +0000 (04:52 +0900)]
Add lxc.network.mtu configuration (resend)

Hi Daniel,

I resent my patch. I hope to fix folding failure.

This patch allows users to specify the MTU size of the veth interface.
 It helps to use jumbo frames on the container.

Changes from v1:
- Fix failing if the 'mtu' is not specified.
- Delete the 'mtu' entry at time of lxc-destroy.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix capability setting for lxc-init
Daniel Lezcano [Fri, 20 Mar 2009 15:25:46 +0000 (16:25 +0100)]
Fix capability setting for lxc-init

lxc-init has moved to libexec, change the corresponding setcap
path.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd powerpc signalfd syscall numbers
Matt Helsley [Fri, 20 Mar 2009 05:44:20 +0000 (22:44 -0700)]
Add powerpc signalfd syscall numbers

Add signalfd and signalfd4 syscall number definitions for powerpc so
that we may compile even with older platform headers.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoCONTRIBUTING: specify where one can send patches
Guido Trotter [Wed, 18 Mar 2009 08:50:09 +0000 (08:50 +0000)]
CONTRIBUTING: specify where one can send patches

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoCONTRIBUTING: fix two typos
Guido Trotter [Wed, 18 Mar 2009 08:50:10 +0000 (08:50 +0000)]
CONTRIBUTING: fix two typos

s/accessible/accessed/ because the optionality of the possibility is
already expressed by the 'can be' in front of it.

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-checkconfig: Allow to override grep and config
Guido Trotter [Wed, 18 Mar 2009 17:53:32 +0000 (17:53 +0000)]
lxc-checkconfig: Allow to override grep and config

It might be handy for the user to specify a different kernel config file
to check, perhaps the one of a kernel he's about to build. To allow that
we only set the CONFIG variable if it's not present in the environment
before. Also, if CONFIG is not found and we resort to a different file,
we say it explicitely, to avoid typos on the user's part resulting in
silently checking a different config than the one the user wanted.

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-checkconfig: look in one more place
Guido Trotter [Wed, 18 Mar 2009 17:53:31 +0000 (17:53 +0000)]
lxc-checkconfig: look in one more place

The current version of lxc-checkconfig falls back to searching in
/lib/modules/$KVER/build/.config if it doesn't find the config. In some
systems, though, the config will be installed in /boot/config-$KVER, so
we'll look there as well.

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoInstall lxc-init in libexec dir
Guido Trotter [Wed, 18 Mar 2009 17:27:27 +0000 (17:27 +0000)]
Install lxc-init in libexec dir

Since lxc-init is a helper program, which doesn't have an usage output
and is only going to be called only internally by lxc-execute, we'll
move it to the libexec dir.

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd .gitignore and avoid annoying interaction between compiled files and git
Daniel Lezcano [Mon, 16 Mar 2009 11:21:24 +0000 (12:21 +0100)]
Add .gitignore and avoid annoying interaction between compiled files and git

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoUse the rbind mount for the rootfs
Daniel Lezcano [Wed, 11 Mar 2009 09:20:05 +0000 (10:20 +0100)]
Use the rbind mount for the rootfs

The actual behavior is to mount bind the rootfs to a specific location and
chroot to it. If someone did previously some bind mount in the rootfs they
will be lost in the container.

This fix makes the rootfs to have the submounts in the container.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc-checkconfig fails on a kernel compiled without IKCONFIG_PROC.
Kristian Høgh [Tue, 10 Mar 2009 10:00:32 +0000 (11:00 +0100)]
lxc-checkconfig fails on a kernel compiled without IKCONFIG_PROC.

Hi Daniel,

This patch retrieves info from kernel config in
/lib/modules/`uname -r`/build/.config
unless /proc/config.gz exist

Signed-off-by: Kristian Høgh <kfh.lxc@kfh.dk>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agos390 sys_clone is backwards
Serge E. Hallyn [Mon, 9 Mar 2009 19:28:38 +0000 (14:28 -0500)]
s390 sys_clone is backwards

Switch the flags and sp for sys_clone for s390.

Without this, lxc-execute gets a segfault on clone (of course).
With this, it succeeds.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agodefine s390x signalfd for old headers
Serge E. Hallyn [Mon, 9 Mar 2009 16:35:51 +0000 (11:35 -0500)]
define s390x signalfd for old headers

define s390x signalfd for systems with headers which are too
old.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agodefine signalfd patch
Michael K. Johnson [Sun, 8 Mar 2009 16:24:26 +0000 (17:24 +0100)]
define signalfd patch

If sys/signalfd.h does not exist, assume that it does not exist
in glibc, rather than that it exists without a corresponding
header file.  Note that this version of the signalfd() wrapper
function (unlike the version in glibc) falls back dynamically to
the old signalfd system call if the signalfd4 system call is not
implemented in the currently-running kernel; the version in glibc
chooses the version of the signalfd system call to make via static
build-time configuration.

Signed-off-by: Michael K Johnson <johnsonm@rpath.com>
Signed-off-by: Daniel Lezcnao <dlezcano@fr.ibm.com>
15 years agoliblxc: Remove unused variable
Matt Helsley [Sun, 8 Mar 2009 16:09:27 +0000 (17:09 +0100)]
liblxc: Remove unused variable

nbargs isn't used for anything in lxc_unshare.c. Remove it.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoliblxc: Add username and uid lookup/check.
Matt Helsley [Sun, 8 Mar 2009 16:09:27 +0000 (17:09 +0100)]
liblxc: Add username and uid lookup/check.

Add the ability to lookup usernames and check uids. Bails out early if the given
uid/name does not exist and avoids using atoi() (which is bad because we can't
tell if it parsed an int or a pumpkin).

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoliblxc: Fix compiler warning
Matt Helsley [Sun, 8 Mar 2009 16:09:27 +0000 (17:09 +0100)]
liblxc: Fix compiler warning

The second const qualifier causes gcc to emit a warning. const char *
should be sufficient.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoliblxc: Handle missing PR_CAPBSET_DROP definition
Matt Helsley [Sun, 8 Mar 2009 16:09:27 +0000 (17:09 +0100)]
liblxc: Handle missing PR_CAPBSET_DROP definition

On distros with older headers liblxc fails to build because PR_CAPBSET_DROP is
not defined by including /usr/include/sys/prctl.h. This adds an autoconf
test and, if not present, defines it. When prctl() is called on systems that
do not support PR_CAPBSET_DROP we should expect EINVAL. This case is already
handled by the liblxc code so no further changes are needed.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoliblxc: create a fedore template container
Matt Helsley [Sun, 8 Mar 2009 16:09:27 +0000 (17:09 +0100)]
liblxc: create a fedore template container

On Mon, 2009-02-09 at 15:43 -0800, Dan Smith wrote:
> DL> It may be possible to use yum like debootstrap for an minbase
> DL> fedora install.
>
> Yep, something like the following should work:
>
>   root=/path/to/tmproot
>   mkdir -p $root/var/lib/rpm
>   rpm --root $root --initdb
>   rpm --root $root -Uvfh --nodeps http://fedora.osuosl.org/linux/releases/10/Fedora/i386/os/Packages/fedora-release-10-1.noarch.rpm
>   yum --installroot=$root -y groupinstall Base

Looks familiar! ;) I was intrigued by this idea last weekend so I
started such a script. However I only tested it as far as creating a
semi-correct rootfs. With the exception of network configs most of the
configs are still written as for debian. For example I know the selinux
policy enforcement settings need to move, the inittab needs to be
replaced by the proper upstart configs, etc.

Of course it's based heavily on Daniel's excellent lxc-debian script.

Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd the pts configuration for lxc-debian
dlezcano [Fri, 20 Feb 2009 14:13:37 +0000 (14:13 +0000)]
Add the pts configuration for lxc-debian
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Add the pts configuration when creating a debian container.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd missing files to CVS
dlezcano [Mon, 16 Feb 2009 11:25:49 +0000 (11:25 +0000)]
Add missing files to CVS

15 years agoFactor out some code
dlezcano [Mon, 16 Feb 2009 10:22:49 +0000 (10:22 +0000)]
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>
15 years agoSupport block device for the rootfs
dlezcano [Mon, 16 Feb 2009 10:21:41 +0000 (10:21 +0000)]
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>
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>