Commit Graph

4413 Commits

Author SHA1 Message Date
Stéphane Graber
1f42bbcec5 Merge pull request #1162 from brauner/2016-08-31/remove_halt_symlink
templates: rm halt.target -> sigpwr.target symlink
2016-08-31 18:29:32 -04:00
Christian Brauner
8eb62c245e
templates: rm halt.target -> sigpwr.target symlink
Given commit 330ae3d350:

    lxccontainer: detect if we should send SIGRTMIN+3

    This is required by systemd to cleanly shutdown. Other init systems should not
    have SIGRTMIN+3 in the blocked signals set.

we should stop symlinking halt.target to sigpwr.target for systemd.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-31 23:53:50 +02:00
Christian Brauner
a2226efb4a Merge pull request #1157 from evgeni/doxygen-no-full-path-names
set FULL_PATH_NAMES=NO in doc/api/Doxyfile
2016-08-27 12:21:29 +02:00
Evgeni Golov
fef509cbc5 set FULL_PATH_NAMES=NO in doc/api/Doxyfile
otherwise the generated docs have the full build path in them
and nonbody cares that the files were built in
 /build/lxc-_BVY2u/lxc-2.0.4/src/lxc/

Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-08-27 12:14:59 +02:00
Christian Brauner
43ae0e64b7 Merge pull request #1155 from tych0/migration-fixes
Migration fixes
2016-08-26 23:53:35 +02:00
Tycho Andersen
f3886023c1 c/r: write status only after trying to parse the pid
Previously, we write a "success" status but tried to parse the pid. This
meant that we wouldn't notice a successful restore but failure to parse the
pid, which was a little strange.

We still don't know the child pid, so we will end up with a restored
process tree and a running container, but at least in this case the API
will return false indicating that something failed.

We could kill(-1, 9) in this case, but since liblxc runs as root sometimes
(e.g. LXD), that would be a Very Bad Thing.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-08-26 16:29:45 -04:00
Tycho Andersen
1f56665557 remove extra 'ret'
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-08-26 16:13:06 -04:00
Christian Brauner
605bb3c847 Merge pull request #1154 from stgraber/master
c/r: Fix pid_t on some arches
2016-08-26 22:07:58 +02:00
Stéphane Graber
3eba9b495e c/r: Fix pid_t on some arches
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-08-26 15:43:48 -04:00
Christian Brauner
69dffc98e3 Merge pull request #1152 from tych0/fix-migration-2.0.4
c/r: use /proc/self/tid/children instead of pidfile
2016-08-26 18:48:38 +02:00
Tycho Andersen
75d219f0cc c/r: use /proc/self/tid/children instead of pidfile
All we really needed a unique temp file for was passing the pid. Since CRIU
opened this with O_EXCL | O_CREAT, this was "safe" (users could still
overwrite it afterwards, but the monitor would immediately die since the
only valid number in there was the init process).

In any case, we can just read /proc/self/tid/children, which lists the
child process.

Closes #1150

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
2016-08-26 16:26:50 +00:00
Serge Hallyn
e854c5e315 Merge pull request #1151 from brauner/2016-08-26/fix_lxc_device
tools: use boolean for ret in lxc_device.c
2016-08-26 10:48:29 -04:00
Christian Brauner
30a5e4367b
tools: use boolean for ret in lxc_device.c
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-26 12:49:23 +02:00
Serge Hallyn
fe8ded6d57 Merge pull request #1139 from brauner/2016-08-18/use_exit_in_all_tools
tools: use exit(EXIT_*) everywhere
2016-08-26 06:15:37 -04:00
Christian Brauner
ff475ab9ff Merge pull request #1145 from glensc/pld-patch
add PLD Linux support to upstream repo
2016-08-23 21:33:10 +02:00
Elan Ruusamäe
487ea5f603 templates: add PLD Linux support
from pld-linux repo:
https://github.com/pld-linux/lxc/commits/auto/th/lxc-2.0.4-1/lxc-pld.in.sh
https://github.com/pld-linux/lxc/commits/auto/th/lxc-2.0.4-1/lxc-pld.patch

Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
2016-08-23 22:06:17 +03:00
Christian Brauner
f39f2eaaa9 Merge pull request #1148 from glensc/fed-openssl
templates: fedora requires openssl binary
2016-08-23 18:58:08 +02:00
Elan Ruusamäe
51f88c5c89
templates: fedora requires openssl binary
/usr/share/lxc/templates/lxc-fedora: line 1078: openssl: command not found

Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
2016-08-23 19:32:56 +03:00
Christian Brauner
6cbcf34c00 Merge pull request #1146 from glensc/fd-200
use fd 9 instead of 200
2016-08-22 09:26:59 +02:00
Elan Ruusamäe
570c8ed7a1
templates: use fd 9 instead of 200
to catch up mksh changes from 17abf27

Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
2016-08-21 12:17:06 +03:00
Stéphane Graber
d67c0621a3 Merge pull request #1144 from brauner/2016-08-19/seccomp_non_functional_changes
seccomp: non functional changes
2016-08-19 16:05:14 -04:00
Christian Brauner
f06c6207f3
seccomp: non functional changes
- log more errnos
- adapt coding style

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-19 20:50:12 +02:00
Stéphane Graber
2d7821e506 Merge pull request #1141 from brauner/2016-08-19/add_missing_arches
confile: add more archs to lxc_config_parse_arch()
2016-08-19 11:58:04 -04:00
Stéphane Graber
55fa32934f Merge pull request #1142 from brauner/2016-08-19/add_s390x_seccomp_support
seccomp: add support for s390x
2016-08-19 11:57:28 -04:00
Christian Brauner
567b204984
seccomp: remove double include and order includes
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-19 15:20:22 +02:00
Christian Brauner
be038e4948
seccomp: add support for s390x
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-19 11:57:14 +02:00
Christian Brauner
08245e8c1b
confile: add more archs to lxc_config_parse_arch()
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-19 11:36:11 +02:00
Christian Brauner
f4b5c87057 Merge pull request #1133 from jcowgill/mips
Add MIPS support
2016-08-18 18:49:54 +02:00
James Cowgill
d36c8ae3bf seccomp: fix strerror()
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:32 +01:00
James Cowgill
e319eb3478 seccomp: Add mips and mips64 entries to lxc_config_parse_arch
Fixes "unsupported personality" warnings when starting containers.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:25 +01:00
James Cowgill
6f943dd9ab templates: Add mips hostarch detection to debian
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:15 +01:00
James Cowgill
2ccd9edaa8 seccomp: Implement MIPS seccomp handling
MIPS processors implement 3 ABIs: o32, n64 and n32 (similar to x32). The kernel
treats each ABI separately so syscalls disallowed on "all" arches should be
added to all three seccomp sets. This is implemented by expanding compat_arch
and compat_ctx to accept two compat architectures.

After this, the MIPS hostarch detection code and config section code is added.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:11 +01:00
James Cowgill
f53b591652 utils: Add mips signalfd syscall numbers
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
2016-08-18 16:49:05 +01:00
Christian Brauner
f0c6ee287c
tools: unify exit() calls outside of main()
This also changes the help exit status of lxc-unshare and lxc-usernsexec. So
far they did exit(EXIT_FAILURE) whereas all other tools do exit(EXIT_SUCCESS).
Let's align them with the rest of the tools. This should be safe to do.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-18 11:11:34 +02:00
Christian Brauner
b52b059591
tools: use exit(EXIT_*) everywhere
Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-18 11:07:33 +02:00
Christian Brauner
7847a507c9 Merge pull request #1140 from ysbnim/master
Update korean manuals
2016-08-18 10:55:18 +02:00
Sungbae Yoo
6b9c2f40fd doc: Add --rcfile to Japanese common opts
Update for commit 71d74a8

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-08-18 17:51:34 +09:00
Sungbae Yoo
14acde79bb doc: Add --rcfile to Korean common opts
Update for commit 71d74a8

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-08-18 16:50:15 +09:00
Sungbae Yoo
ef747fd885 doc: Update Korean lxc-attach(1)
* Update for commit 03b0398
 * Fix mistranslation words

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
2016-08-18 16:41:37 +09:00
Christian Brauner
72e4901101 Merge pull request #1138 from stgraber/master
Use full GPG fingerprint instead of long IDs.
2016-08-17 21:49:30 +02:00
Stéphane Graber
dd2dbcb920 Use full GPG fingerprint instead of long IDs.
With how easy it is to create a collision on a short ID nowadays and
given that the user doesn't actually have to remember or manually enter
the key ID, lets just use the full fingerprint from now on.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-08-17 15:42:34 -04:00
Christian Brauner
6fe6560698 Merge pull request #1122 from Blub/rcfile-as-common-arg
Rcfile as common arg
2016-08-17 17:27:16 +02:00
Wolfgang Bumiller
6f94152de5 cleanup: replace tabs wth spaces in usage strings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
7665872377 cleanup: whitespaces in option alignment for lxc-execute
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
8564baf99a cleanup: tools: remove --name from lxc-top usage message
It doesn't have any effect on what lxc-top does and is only
accepted on account of being part of the common option list.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
71d74a8342 doc: add --rcfile to common opts
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
6118210e0a tools: set configfile after load_config
In order to cause c->is_defined() to become true.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Wolfgang Bumiller
50b737a3c6 tools: move --rcfile to the common options list
In almost all commands it's a useful addition to the -n
switch which is a common option, too.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2016-08-17 16:27:23 +02:00
Stéphane Graber
91e7dd57a0 Merge pull request #1134 from brauner/2016-08-16/load_correct_ovl_module
bdev: use correct overlay module name
2016-08-16 22:56:43 +02:00
Christian Brauner
88232d3f4e
bdev: use correct overlay module name
- Assume that the module name is "overlay" per default and not "overlayfs".
- Assume that the overlay version we are using requires a workdir.
- When we mount an overlay filesystem and we fail with ENODEV retry once with
  the module name we haven't already used.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
2016-08-16 22:24:04 +02:00