]> git.proxmox.com Git - mirror_lxc.git/log
mirror_lxc.git
15 years agoadd the autogen script in the dist tarball
Daniel Lezcano [Fri, 24 Apr 2009 09:32:58 +0000 (11:32 +0200)]
add the autogen script in the dist tarball

Add the autogen script to the tarball so people using the
dist version can patch the auto* files and regenerate them
directly for the dist tarball.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Reported-by: Michael K Johnson <johnsonm@rpath.com>
15 years agorename bootstrap to autogen.sh
Daniel Lezcano [Fri, 24 Apr 2009 09:32:58 +0000 (11:32 +0200)]
rename bootstrap to autogen.sh

By convention the script calling the auto tools is named
autogen.sh. I rename 'bootstrap' to 'autogen.sh' in order to
stick to this convention.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Reported-by: Michael K Johnson <johnsonm@rpath.com>
15 years agoadd the missing header in the log file
Daniel Lezcano [Fri, 24 Apr 2009 09:32:58 +0000 (11:32 +0200)]
add the missing header in the log file

License header is missing in the log files.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolocally define O_CLOEXEC
Michel Normand [Fri, 24 Apr 2009 09:32:58 +0000 (11:32 +0200)]
locally define O_CLOEXEC

this is a required patch to be able to compile lxc on a RedHat 5 update 1
which has such define.
This is also required for the F_DUPFD_CLOEXEC define

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agomake the log fd thread safe
Daniel Lezcano [Tue, 21 Apr 2009 19:51:13 +0000 (21:51 +0200)]
make the log fd thread safe

Add the tls attribute for the global static variables in the logs.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc: cleanup log
Cedric Le Goater [Tue, 21 Apr 2009 19:51:13 +0000 (21:51 +0200)]
lxc: cleanup log

some headers and macros are now redundant

Signed-off-by: Cedric Le Goater <legoater@free.fr>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc: use new logging system
Cedric Le Goater [Tue, 21 Apr 2009 19:51:13 +0000 (21:51 +0200)]
lxc: use new logging system

This patch defines a new log category in each file using logging and
replaced the former logging routines with the new ones.

Signed-off-by: Cedric Le Goater <legoater@free.fr>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agolxc: introduce log4c style logging
Cedric Le Goater [Tue, 21 Apr 2009 19:51:13 +0000 (21:51 +0200)]
lxc: introduce log4c style logging

lxc_log_init() should be called in each main() of a command
to define the default log priority and log file.

Signed-off-by: Cedric Le Goater <legoater@free.fr>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoexclude generated tarball from git managed files
Michel Normand [Mon, 20 Apr 2009 20:10:59 +0000 (22:10 +0200)]
exclude generated tarball from git managed files

exclude generated tarball from git managed files

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agomake the libtoolize files to be copy not
Michel Normand [Mon, 20 Apr 2009 20:10:59 +0000 (22:10 +0200)]
make the libtoolize files to be copy not

This is required to be able to make the build
on a machine that mount lxc source but not all
machine filesystem.
.
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoAdd support for various mount options
Ryousei Takano [Mon, 20 Apr 2009 20:10:59 +0000 (22:10 +0200)]
Add support for various mount options

This patch adds support for various mount options.  It is also able to pass extra
mount option data to mount(2).  For example, it allows users to mount aufs file
system at lxc_start time.

See the thread
http://sourceforge.net/mailarchive/forum.php?thread_name=E6D98D6C-F633-419A-9424-F24EBB3E11D9%40aist.go.jp&forum_name=lxc-devel
for details.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoprevent tty fd to be inherited in the container
Môshe van der Sterre [Mon, 20 Apr 2009 20:10:59 +0000 (22:10 +0200)]
prevent tty fd to be inherited in the container

Set the close on exec flag on the pty fd so they are automatically
closed when execing the container.

Signed-off-by: Môshe van der Sterre <me@moshe.nl>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agocheck multiple devpts instance
Môshe van der Sterre [Mon, 20 Apr 2009 20:10:59 +0000 (22:10 +0200)]
check multiple devpts instance

Hello,

It took me some thinking to figure out DEVPTS_MULTIPLE_INSTANCES was disabled.
Maybe checking for it in lxc-checkconfig will be helpfull to others.

Greetings,
Môshe van der Sterre

Signed-off-by: Môshe van der Sterre <moshevds@gmail.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agodon't remove init file in the stop function
Daniel Lezcano [Tue, 31 Mar 2009 11:55:44 +0000 (13:55 +0200)]
don't remove init file in the stop function

At present the 'init' file is deleted from the 'stop' function and
I don't remember why it is done in this place :)

The 'init' file is removed from the 'start' when the first process
has been deleted.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agospeed container creation/destruction
Daniel Lezcano [Tue, 31 Mar 2009 11:55:44 +0000 (13:55 +0200)]
speed container creation/destruction

As the state of the container is monitored with the netlink,
the file state is no longer used to watch the state changes.

The previous hack, which adds a tempo of 200ms, is removed and
that makes the container being created, started, stopped, destroyed
faster, we gain 1 second in a container lifecycle. One second is
too much if we launch thousand of containers, one by one like for
example in a tests suite.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoFix compile warnings
Ryousei Takano [Tue, 31 Mar 2009 01:14:04 +0000 (10:14 +0900)]
Fix compile warnings

This patch fixes compile warnings: ignoring return value of function,
declared with attribute warn_unused_result, and adds error handling.

Signed-off-by: Ryousei Takano <takano-ryousei@aist.go.jp>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years ago$(localstatedir) != $(prefix)/var
Guido Trotter [Mon, 30 Mar 2009 09:12:13 +0000 (10:12 +0100)]
$(localstatedir) != $(prefix)/var

The current code assumes that localstatedir is equal to $(prefix)/var,
thus failing for example on debian, where prefix is /usr and
localstatedir is /var. This patch fixes this by expanding LXCPATH just
once in configure.ac to $(localstatedir)/lib/lxc and expanding that
variable everywhere else.

install-exec-local is changed to just do one mkdir -p, and taking into
account of the DESTDIR variable, user for example for packaging.

Changing the permission of LXCPATH is done in lxc-setcap

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agoadd error.h header
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
add error.h header

Add the missing header in the package installation.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
15 years agomove lxc_conf_init to conf.c
Daniel Lezcano [Mon, 30 Mar 2009 12:02:19 +0000 (14:02 +0200)]
move lxc_conf_init to conf.c

Changed the struct lxc_conf initialization function to the
right place.

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

Rename lxc_config.h to confile.h

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

Rename lxc_state.h to state.h

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

Rename lxc_list.h to list.h

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
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>