Commit Graph

343 Commits

Author SHA1 Message Date
Stéphane Graber
1e2eb3f4e6 Merge pull request #536 from regit/passthru-v1.2
Passthru v1.2
2015-05-25 11:51:07 -04:00
Eric Leblond
c15ea60706 doc: add 'macvlan' 'passthru' mode
This patch also reword the macvlan section which was hard to read.

Signed-off-by: Eric Leblond <eric@regit.org>
2015-05-25 17:42:40 +02:00
Sungbae Yoo
37cf711b28 config : add lxc.hook.destroy option
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2015-05-14 09:00:35 +09:00
KATOH Yasufumi
56e4a18564 Add the use of 'attach' to lxc-start-ephemeral(1)
Update for commit 8158c05

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-04-06 12:12:10 -04:00
KATOH Yasufumi
8128cf4210 doc: Add '--storage-type' option to lxc-start-ephemeral(1)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-04-06 12:12:10 -04:00
KATOH Yasufumi
5f94f7a735 doc: Add options of 'loop' backingstore to lxc-create(1)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-03-13 19:23:40 -04:00
KATOH Yasufumi
ea4cadbfac doc: Add lxc.rebootsignal to Japanese man pages.
Also fix some indentation and improve translation.
Update for commit 936762f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-03-09 22:21:04 -04:00
Bogdan Purcareata
936762f3fb document lxc.rebootsignal
Also fix some minor indentation mishaps since we're here.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-02-18 09:42:38 -08:00
KATOH Yasufumi
65f8fdda25 doc: Add about zfs, aufs, overlayfs to '-s' option of lxc-clone(1)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-02-18 09:40:29 -08:00
KATOH Yasufumi
a9b21284fc doc: Update lxc-snapshot(1) for moving snapshot directory
At the commit 18aa217, the snapshot dir was moved to /var/lib/lxc/c/snaps.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-02-18 09:40:29 -08:00
KATOH Yasufumi
dd93ef87b2 doc: Add the description of sys:mixed in Japanese lxc.container.conf(5)
Update for commit f24a52d

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-01-30 08:53:54 +01:00
Stéphane Graber
f24a52d5f5 Use consistent /proc, /sys and /sys/fs/cgroup (v2)
- Implements mixed mode for /sys where it's mounted read-only but with
   /sys/devices/virtual/net/ writable.

 - Sets lxc.mount.auto to "cgroup:mixed proc:mixed sys:mixed" for all
   templates.

 - Drop any template-specific mount for /proc, /sys or /sys/fs/cgroup.

 - Get rid of the fstab file by default, using lxc.mount.entry instead.

 - Set sys:mixed as the default for "sys". sys:mixed is slightly more
   permissive than sys:ro so this shouldn't be a problem.

The read-only bind mount of /sys on top of itself is there so that
mountall and other init systems don't attempt to remount /sys
read-write.

v2 changes:
 - Fix the mount list, don't specify a source for the remount.
 - Update the documentation.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-29 11:44:02 +01:00
KATOH Yasufumi
a9516fe57f Change the default value of kmsg and autodev in Japanese man
Update Japanese lxc.container.conf(5) for commit 124fa0a and d89de23.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-01-27 08:07:46 +00:00
Stéphane Graber
d89de2399c Set kmsg to 0 by default
It's now been proven over and over again that the symlink from /dev/kmsg
to /dev/console is harmful for everything but upstart systems. As Ubuntu
is now switching over to systemd too, lets switch the default.

Upstart users wishing to see boot messages can always set lxc.kmsg = 1
manually in their config (so long as they don't expect to then
dist-upgrade the container to systemd succesfuly).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-20 19:47:17 -05:00
Stéphane Graber
124fa0a869 Turn autodev on by default
Now that autodev works fine with unprivileged containers and shouldn't
come with any side effect, lets turn it on by default.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2015-01-20 19:47:14 -05:00
KATOH Yasufumi
ac11ab3351 doc: Update the description of the veth in the Japanese lxc.container.conf(5)
Update for the commit 38005c5

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-01-16 18:03:24 -05:00
Michael Adam
38005c5436 doc: clarify the description of the veth network type in the manpage.
Signed-off-by: Michael Adam <obnox@samba.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2015-01-15 17:11:48 -05:00
Veres Lajos
ec64264d78 typofixes - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-04 18:40:26 -05:00
KATOH Yasufumi
be54cb1c55 doc: Always include the Japanese lxc-top manpage
Update for commit e71549f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-02 10:56:03 -05:00
KATOH Yasufumi
c881c406ac Add the Japanese translation for the lxc.init_cmd config option
Update for commit 67c660d

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-02 10:55:56 -05:00
Stéphane Graber
e71549fc7e doc: Always include the lxc-top manpage
Since it's no longer written in lua.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 13:46:37 -05:00
Stéphane Graber
67c660d0aa Define a new lxc.init_cmd config option
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
2014-12-01 13:46:11 -05:00
Stéphane Graber
c464fd7e01 tabs/spaces consistency
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-12-01 13:44:11 -05:00
KATOH Yasufumi
fb26e957f1 doc: change "-t" option of lxc-create(1) to being required
* fix "reg" to "req" in English (fix for commit b8683fe)
* change "opt" to "req" in Japanese

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-11-26 10:33:25 -05:00
KATOH Yasufumi
3726cda21a doc: Update kernel and cgroup info in Japanese lxc(7)
Update for commit 0dcbd62

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-25 14:05:14 -05:00
Silvio Fricke
b8683fefa9 lxc-create -t option is not optional
Closes: #355

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-11-24 22:46:50 -05:00
Stéphane Graber
0dcbd62472 Fix the lxc manpage a bit
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-11-24 16:10:01 -05:00
KATOH Yasufumi
a1dd59de35 doc: Drop lxc.pivotdir from Japanese lxc.container.conf(5)
Update for commit 2d489f9

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-09-25 16:03:38 -04:00
KATOH Yasufumi
a5475f8f44 doc: Update Japanese lxc-top(1) for porting C version
Update for commit 7dc6f6e

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-09-24 11:26:04 -04:00
KATOH Yasufumi
edf3a692c7 doc: Add lxc.aa_allow_incomplete flag to Japanese man
Update Japanese lxc.container.conf(5) for commit 93c709b

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-09-24 11:25:58 -04:00
Dwight Engen
7dc6f6e279 port lxc-top from lua to C for wider availability
- keep but rename the lua version as an example of how to use the lua API

- got rid of the fairly useless --max argument

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-09-23 15:23:05 -04:00
KATOH Yasufumi
b58575f748 doc: Add description about ignoring lxc.cgroup.use when using cgmanager
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-09-23 10:16:16 -04:00
Serge Hallyn
93c709b231 document the new lxc.aa_allow_incomplete flag
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-09-22 17:29:30 -04:00
Serge Hallyn
2d489f9e87 pivot_root: switch to a new mechanism (v2)
This idea came from Andy Lutomirski.  Instead of using a
temporary directory for the pivot_root put-old, use "." both
for new-root and old-root.  Then fchdir into the old root
temporarily in order to unmount the old-root, and finally
chdir back into our '/'.

Drop lxc.pivotdir from the lxc.container.conf manpage.

Warn when we see a lxc.pivotdir entry (but keep it in the
lxc.conf for now).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-09-22 17:27:20 -04:00
KATOH Yasufumi
b0e26ca77b doc: Translate lxc-checkpoint(1) into Japanese
Update for commit 735f2c6

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-27 10:47:41 -04:00
Tycho Andersen
735f2c6e50 Add support for checkpoint and restore via CRIU
This patch adds support for checkpointing and restoring containers via CRIU.
It adds two api calls, ->checkpoint and ->restore, which are wrappers around
the CRIU CLI. CRIU has an RPC API, but reasons for preferring exec() are
discussed in [1].

To checkpoint, users specify a directory to dump the container metadata (CRIU
dump files, plus some additional information about veth pairs and which
bridges they are attached to) into this directory. On restore, this
information is read out of the directory, a CRIU command line is constructed,
and CRIU is exec()d. CRIU uses the lxc-restore-net callback (which in turn
inspects the image directory with the NIC data) to properly restore the
network.

This will only work with the current git master of CRIU; anything as of
a152c843 should work. There is a known bug where containers which have been
restored cannot be checkpointed [2].

[1]: http://lists.openvz.org/pipermail/criu/2014-July/015117.html
[2]: http://lists.openvz.org/pipermail/criu/2014-August/015876.html

v2: fixed some problems with the s/int/bool return code form api function
v3: added a testcase, fixed up the man page synopsis
v4: fix a small typo in lxc-test-checkpoint-restore
v5: remove a reference to the old CRIU_PATH, and a bad error about the same

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-26 10:40:05 -04:00
KATOH Yasufumi
8b3374e5e7 doc: Fix Japanese translation of lxc.containers.conf(5)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-18 09:01:25 -04:00
Lars Wikberg
70bb1a9ca7 doc: language correction
Signed-off-by: Lars Wikberg <lars.wikberg@anvia.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-15 21:08:23 -04:00
KATOH Yasufumi
48e60dfeef doc: add lxc.console.logpath to Japanese lxc.container.conf(5)
Update for commit 96f15ca

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-15 21:03:09 -04:00
Serge Hallyn
96f15ca18c add lxc.console.logpath
v2: add get_config_item

clear_config_item is not supported, as it isn't for lxc.console, bc
you can do 'lxc.console.logfile =' to clear it.  Likewise save_config
is not needed because the config is now just written through the
unexpanded char*.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-06 18:43:34 -04:00
KATOH Yasufumi
3ca73691b9 doc: Add 'zfs' to the parameter of -B option in lxc-create(1)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-04 15:46:49 -04:00
KATOH Yasufumi
03c315afc1 doc: Update the description of SELinux in Japanese lxc.container.conf(5)
Update for commit 719fae0

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-04 15:46:47 -04:00
KATOH Yasufumi
9231d3a4bb doc: Add the description of lxc.environment to Japanese lxc.container.conf(5)
Update for commit 7c66172

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-04 15:46:45 -04:00
KATOH Yasufumi
36c94e0d58 doc: Change default to "-d" in Japanese lxc-start(1)
Update for commit c00f3f3

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-04 15:46:42 -04:00
KATOH Yasufumi
22c36623bb doc: Add -F option to Japanese lxc-start(1)
Update for commit 476d302

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-08-04 15:46:40 -04:00
Dwight Engen
719fae07bf provide an example SELinux policy for older releases
The virtd_lxc_t type provided by the default RHEL/CentOS/Oracle 6.5
policy is an unconfined_domain(), so it doesn't really enforce anything.
This change will provide a link in the documentation to an example
policy that does confine containers.

On more recent distributions with new enough policy, it is recommended
not to use this sample policy, but to use the types already available
on the system from /etc/selinux/targeted/contexts/lxc_contexts, ie:

process = "system_u:system_r:svirt_lxc_net_t:s0"
file = "system_u:object_r:svirt_sandbox_file_t:s0"

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-07-31 14:12:25 -04:00
Matt Palmer
7c6617262d Support providing env vars to container init
It's quite useful to be able to configure containers by specifying
environment variables, which init (or initscripts) can use to adjust the
container's operation.

This patch adds one new configuration parameter, `lxc.environment`, which
can be specified zero or more times to define env vars to set in the
container, like this:

    lxc.environment = APP_ENV=production
    lxc.environment = SYSLOG_SERVER=192.0.2.42
    lxc.environment = SOMETHING_FUNNY=platypus

Default operation is unchanged; if the user doesn't specify any
lxc.environment parameters, the container environment will be what it is
today ('container=lxc').

Signed-off-by: Matt Palmer <mpalmer@hezmatt.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-07-31 13:54:20 -04:00
Stéphane Graber
c00f3f36e1 lxc-start: Daemonize by default
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-07-31 13:46:51 -04:00
Stéphane Graber
476d302ca2 lxc-start: Add -F (foreground) option
Introduce a new -F option (no-op for now) as an opposite of -d.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-07-31 13:46:31 -04:00
KATOH Yasufumi
16a410466e doc: Add mention that veth.pair is ignored for unpriv in Japanese man
Update Japanese lxc.container.conf(5) for commit 8982c0f

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-07-16 12:42:25 -04:00