Commit Graph

225 Commits

Author SHA1 Message Date
Stéphane Graber
ff6bf8d18f doc: Update no-netns for lxc.network.type = none
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-16 16:28:20 -05:00
Stéphane Graber
c5afb6e455 lxc-ls: Add -f and -F as aliases
Alias -f to --fancy and -F to --fancy-format.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-16 15:45:02 -05:00
KATOH Yasufumi
3dcb8ff3dd doc: Update Japanese man pages
* lxc-unshare(1): Update for commit c1bb25a831 and 13d8bde96f
* lxc.conf(5): Update for commit 04a243f11d

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-16 10:35:26 -05:00
Stéphane Graber
09ec76ceec
Add missing entry to dist target
Apparently this file has gone over 5 years without getting into a dist
tarball!

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 19:21:26 -05:00
Seth Robertson
c1bb25a831 Teach lxc_unshare about interfaces, mounts, hostname, daemonize
lxc_unshare now takes one or more '-i interfacename' arguments which
will move the named interfaces into the created container.

lxc_unshare now takes -M argument which will cause the standard mounts
(/proc /dev/shm /dev/mqueue) to be auto-mounted inside container.

lxc_unshare now takes '-H hostname' argument to automatically set
the hostname in the container.

lxc_unshare now takes -D argument to automatically daemonize and detach
from the created container, instead of waiting for the container to exit

Signed-off-by: Seth Robertson <srobertson@appcomsci.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 15:42:36 -06:00
Seth Robertson
13d8bde96f lxc_unshare -u argument useful even with USER namespace shared
Signed-off-by: Seth Robertson <srobertson@appcomsci.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-15 15:42:29 -06:00
Serge Hallyn
04a243f11d lxc.conf: note the 'lxc.network.type = none' option
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 12:20:50 -05:00
KATOH Yasufumi
fcdb97df5d doc: Update Japanese lxc.conf(5)
Update for commit df2d420507

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-15 10:06:10 -05:00
KATOH Yasufumi
83b4b1dca8 doc: Update lxc.conf(5)
* Update Japanese lxc.conf(5) for commit 508c263ee6
* Remove duplicate line in English lxc.conf(5)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-14 09:50:43 -05:00
Serge Hallyn
508c263ee6 This change introduce mac address templating.
By setting lxc.network.hwaddr to something like fe:xx:xx:xx:xx:xx each
"x" will be replaced by a random value.  If less significant bit of
first byte is "templated", it will be set to 0.

This change introduce also a common randinit() function that could be
used to initialize random generator.

Signed-off-by: gza <lxc@zitta.fr>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-01-13 10:04:10 -06:00
Dwight Engen
df2d420507 ensure all config items are duplicated on clone/write_config
Since previously I had found a config item that wasn't being propagated
by lxc-clone, I went through all the config items and made sure that:
 a) Each item is documented in lxc.conf
 b) Each item is written out by write_config

The only one that isn't is lxc.include, which by its nature only pulls
in other config item types.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2014-01-12 19:25:47 -05:00
KATOH Yasufumi
d7768b9096 doc: Remove unneeded "SEE ALSO" part in lxc-ls(1)
The old version of lxc-ls is the wrapper of ls(1). But now it is
python script, so "see also ls(1)" is not needed.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-09 10:35:07 -05:00
Qiang Huang
6f63931122 lxc-ls.sgml.in: fix the format issue
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-08 09:49:16 -05:00
Stéphane Graber
baeebd0d79
man: Fix comment syntax
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-07 10:26:16 -05:00
KATOH Yasufumi
38d626f8be doc: Update Japanese lxc-stop(1), lxc.conf(5), lxc-start-ephemeral(1)
* nokill option of lxc-stop (commit 84fbfcb434)
* lxc.haltsignal in lxc.conf (commit f0f1d8c076)
* fix sgml (commit d438f5a0ef)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-07 09:22:06 -05:00
Dwight Engen
f0f1d8c076 add lxc.haltsignal for soft shutdown
- use this in the busybox template since busybox's init expects
  to receive SIGUSR1 to halt

- fix lxc.stopsignal to be output by write_config so lxcapi_clone()
  and lxcapi_save_config() will output it

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-06 12:49:44 -05:00
Qiang Huang
d438f5a0ef lxc-start-ephemeral: fix the man page
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-06 10:21:11 -05:00
Dwight Engen
84fbfcb434 rename lxc-stop shutdown argument to nokill
This makes the arguments between lxc-stop and lxc-autostart more
consistent, so that --shutdown doesn't have two different meanings.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-06 10:06:05 -05:00
KATOH Yasufumi
a600d021ad doc: Update man pages to the latest information
* lxc-attach(1): Update to the status of kernel 3.8 or higher
* lxc-create(1), lxc-destroy(1): Now lxc-ls don't have "-l" option, so remove
* lxc(7): update description of lxc-ls and lxc-info to current version
* see-also: fix lxc(1) to lxc(7)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-06 09:51:53 -05:00
KATOH Yasufumi
5fd9f759c1 doc: Update Japanese lxc-autostart(1)
Update for commit a771fe18d2

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-06 09:51:08 -05:00
Dwight Engen
a771fe18d2 change lxc-autostart shutdown to behave like lxc-stop
It is desirable to have a mode where a soft shutdown is requested,
but then do a hard shutdown if after some time period the container
has not shut down. This the default behaviour of lxc-stop, but is
not currently possible with lxc-autostart. This change makes this
the default behaviour when shutdown is specified to lxc-autostart.
This will be very useful for init scripts.

An indefinte wait for soft shutdown (though I'm not sure how that
would be useful) is still possible by passing a timeout of 0.

Change default timeout value to 60 seconds to match lxc-stop

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-01-02 11:01:19 -06:00
KATOH Yasufumi
9a97d4e4bd doc: Improve Japanese man pages
* Improve Japanese translation
* Fix mis-translation
* Insert linefeed between paragraph, because some paragraph is too
  long, so sometimes git send-email could not use.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2014-01-01 14:08:31 -06:00
KATOH Yasufumi
2da1f56ce3 lxc-autostart: don't set timeout if user requested -s
same as the commit 25070b6601

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-12-24 10:05:35 -06:00
KATOH Yasufumi
e339d6b9c1 doc: Fix the description of -n option in lxc-info(1)
Commit 5444216 revised -n option from allowing to specify multiple
containers using regex to specifying only one container. But
lxc-info(1) remains original. so
- mark -n required
- remove the description of -n that is included in common options

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-24 12:43:56 +01:00
KATOH Yasufumi
fe8e3acfa2 doc: Update Japanese lxc-stop(1) for -s option
Update for commit 25070b6601

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-24 12:42:06 +01:00
Serge Hallyn
25070b6601 lxc-stop: don't set timeout if user requested -s
A timeout means wait this long before killing the container.
-s means don't kill the container.  timeout defaults to 60
seconds.  So if a shutdown is requested, then set timeout to
0.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-12-23 10:25:43 -06:00
KATOH Yasufumi
1e6409bced doc: Improve Japanese translation of lxc-stop(1)
Signed-off-by: Kouhei Maeda <mkouhei@gmail.com>
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-22 12:00:08 +01:00
KATOH Yasufumi
28f2ab26ea doc: Add Japanese lxc-autostart(1) and update lxc.conf(5)
Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-20 13:48:05 +01:00
Stéphane Graber
a6adab20ff Add lxc-autostart
This introduces a new lxc-autostart binary (and associated manpage)
which will let you start/shutdown/kill/restart any container that's
marked as lxc.start.auto=1. It respects the lxc.start.delay value,
sorts by lxc.start.order and filters by lxc.group.

By default it'll affect all containers that DO NOT have lxc.group
set. If -g is specified, ONLY containers in those group will be
affected. To have a command applied to all containers, the -a
argument can be used.

A -L flag is also offered for distributions wishing to start the
containers themselves while still using LXC's calculated order and
wait delays. Instead of performing the action, it'll print the container
name and (if relevant for the action) the wait time.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-12-19 21:56:25 +01:00
Stéphane Graber
ee1e7aa0eb autostart: Define lxc.start.* and lxc.group
First patch in the set of changes required for container autostart.

This commit adds the new configuration keys and parsers that will then
be used by lxc-start and lxc-stop.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
2013-12-19 21:48:27 +01:00
KATOH Yasufumi
07ece60087 Add Japanese man pages for lxc-user-nic
Update for commit df3415e022

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-18 12:31:03 +01:00
Serge Hallyn
df3415e022 add manpages for lxc-user-nic
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-12-17 11:15:57 -06:00
KATOH Yasufumi
241c3744ca doc: Update lxc-stop(1) for nolock option
update for commit 8face1de22

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-17 10:19:16 -05:00
Serge Hallyn
8face1de22 stop: add nolock option
If the system gets into a bad state, it may become impossible to get
the lxc container locks.  We should still be able to stop containers
in that case.  Add a -L/--nolock option to specify this behavior.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-16 10:49:05 -06:00
KATOH Yasufumi
359c71b65f doc: Update Japanese lxc-monitor(1)
Update for commit 2afd1dc05b

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-09 14:58:51 -05:00
Dwight Engen
2afd1dc05b let lxc-monitor command ask a lxc-monitord instance to quit
Once lxc-monitord receives a quit request from lxc-monitor, it will then
return from the mainloop every time an event occurs on any of its fds and
check if it has any clients left. When there are no more it exits. This
allows lxc-monitord to quit immediately instead of waiting the normal 30
seconds for more clients, potentially freeing up lxcpath for unmounting.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-06 16:03:23 -05:00
KATOH Yasufumi
53251299b8 doc: Update Japanese lxc.conf(5)
translate the untranslated paragraph

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-06 09:43:55 -05:00
KATOH Yasufumi
a6daed42f7 doc: Update Japanese lxc-start(1)
Update for commit 7faa7f5200

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-12-02 10:00:45 -05:00
hallyn
7faa7f5200 Merge pull request #92 from majek/share-namespaces
Add options to `lxc-start` to inherit network, ipc and uts namespaces
2013-11-25 13:55:30 -08:00
Stéphane Graber
f7f1ba77b7
Drop trailing white spaces.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-25 11:52:43 -05:00
James Hunt
953e611cea Add '--enable-api-docs' for doxygen-generated public API docs.
Signed-off-by: James Hunt <james.hunt@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-25 11:50:01 -05:00
KATOH Yasufumi
1b29d73cba doc: Update Japanese lxc-attach(1)
Update for commit 4d69b2939c

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-25 11:13:22 -05:00
Nikola Kotur
4d69b2939c lxc-attach: elevate specific privileges
There are scenarios in which we want to execute process with specific
privileges elevated.

An example for this might be executing a process inside the container
securely, with capabilities dropped, but not in container's cgroup so
that we can have per process restrictions inside single container.

Similar to namespaces, privileges to be elevated can be OR'd:

    lxc-attach --elevated-privileges='CAP|CGROUP' ...

Backward compatibility with previous versions is retained. In case no
privileges are specified behaviour is the same as before: all of them
are elevated.

Signed-off-by: Nikola Kotur <kotnick@gmail.com>
Acked-By: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-11-20 10:54:47 -06:00
KATOH Yasufumi
6127da6b3f Improve Japanese man pages
Improve the consistency of expression

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-18 10:45:20 -05:00
Stéphane Graber
5444216b7e lxc-info: Rework based on mailinglist thread
So this implements the changes we discussed yesterday:
 - Only one container may be queried at the time
 - -n is now required once again
 - -H + a single filter only returns the value
 - -t/--is-state is now removed

Note that -S is considered as more than a single filter, so -H in that
case only affects the formatting of the values.

For the same reason, I haven't yet implemented the -H + multiple filters
case which we said should return a simple "key: value" output as it
wasn't trivial to re-arrange the stats code to print a different format
(for the other options, it's just a two lines change in the print
functions).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Dwight Engen <dwight.engen@oracle.com>
2013-11-15 16:06:49 -05:00
Marek Majkowski
304dc8b3ff Cosmetic: shorten the options summary in documentation 2013-11-13 07:04:27 -08:00
Marek Majkowski
6c544cb300 Make it possible to share UTS namespace 2013-11-13 05:20:26 -08:00
KATOH Yasufumi
28254e6380 doc: Update Japanese lxc-info(1) for printing statistics
Update for commit b9d957c316

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-12 16:05:13 -05:00
KATOH Yasufumi
56390ccb57 doc: Update Japanese lxc-top(1) for kernel memory accounting.
Update for commit 2752ecec32

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-11-12 16:04:57 -05:00
Marek Majkowski
3c93577b43 Create --share-ipc option 2013-11-12 05:14:25 -08:00