Commit Graph

7917 Commits

Author SHA1 Message Date
Christian Brauner
bb760b77df
autotools: fix --disable-commands builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-17 15:23:41 +02:00
Stéphane Graber
a542f5a713
Merge pull request #2694 from brauner/2018-10-14/lxc_init_logging
lxc-init: log to /dev/console
2018-10-15 10:44:04 -04:00
Christian Brauner
b30b7eea56
lxc-init: log to /dev/console
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-14 22:24:36 +02:00
Christian Brauner
519825b1f1
Merge pull request #2693 from stgraber/master
checkconfig: Handle missing kernel version
2018-10-13 07:47:34 +02:00
Stéphane Graber
c1e61eac48
checkconfig: Handle missing kernel version
https://github.com/lxc/lxd/issues/5151

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-10-12 22:32:17 -04:00
Stéphane Graber
0bf2d4f723
Merge pull request #2692 from brauner/2018-10-12/no_strict_aliasing
autools: use -fno-strict-aliasing
2018-10-12 19:26:43 -04:00
Christian Brauner
a3bb6b8ed9
autools: use -fno-strict-aliasing
The gcc implementation and the C standard are not to be considered sane
in this respect. We don't want to risk reordering of writes when the
compiler incorrectly *thinks* two types do not alias each other.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-12 21:23:07 +02:00
Christian Brauner
a22d1745d7
Merge pull request #2691 from 2xsec/bugfix
Some redundancy codes of abstract unix socket are removed with log cleanups.
2018-10-12 10:39:57 +02:00
2xsec
95e523c856
monitor: fix coding standard
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-12 16:05:31 +09:00
2xsec
5b46db1a63
commands_utils: improve code redundancy to make abstract unix socket name
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-12 15:05:43 +09:00
2xsec
2f1264995f
monitor: checking name too long to make monitor sock name
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-12 11:19:04 +09:00
2xsec
6dd32d35f9
monitor: log cleanups
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-12 10:36:42 +09:00
Christian Brauner
426b9f6148
Merge pull request #2690 from adrianreber/master
checkpoint: fix running do_dump()
2018-10-11 15:58:20 +02:00
Adrian Reber
e20f46f87f
checkpoint: fix running do_dump()
Testing 'lxc <container> stop --stateful' crashed LXD:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe8 pc=0x7f3198ff0592]

runtime stack:
runtime.throw(0x117fe4a, 0x2a)
	/opt/rh/go-toolset-1.10/root/usr/lib/go-toolset-1.10-golang/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
	/opt/rh/go-toolset-1.10/root/usr/lib/go-toolset-1.10-golang/src/runtime/signal_unix.go:372 +0x28e

goroutine 375 [syscall]:
runtime.cgocall(0xef38e3, 0xc420731630, 0x29)
	/opt/rh/go-toolset-1.10/root/usr/lib/go-toolset-1.10-golang/src/runtime/cgocall.go:128 +0x64 fp=0xc4207315f0 sp=0xc4207315b8 pc=0x410fc4
gopkg.in/lxc/go-lxc%2ev2._Cfunc_go_lxc_migrate(0x7f316c001220, 0xc400000001, 0xc420302460, 0xc4205d6080, 0x0)
	_cgo_gotypes.go:752 +0x4d fp=0xc420731630 sp=0xc4207315f0 pc=0x909d7d
gopkg.in/lxc/go-lxc%2ev2.(*Container).Migrate.func4(0x7f316c001220, 0xc400000001, 0xc420302460, 0xc4205d6080, 0x0)
	/share/go/src/gopkg.in/lxc/go-lxc.v2/container.go:1798 +0x160 fp=0xc420731668 sp=0xc420731630 pc=0x91b970
gopkg.in/lxc/go-lxc%2ev2.(*Container).Migrate(0xc4207a52f0, 0x1, 0xc42051ec00, 0x20, 0x0, 0x0, 0x0, 0x0, 0x101, 0x10000000, ...)
	/share/go/src/gopkg.in/lxc/go-lxc.v2/container.go:1798 +0x29f fp=0xc420731760 sp=0xc420731668 pc=0x9160ef

The commit 5a087e056f introduced a second parameter (conf) to the
cgroup escape() function which was never set in do_dump(). Instead of
taking it from opts->handler->conf it is now used from c->lxc_conf.

Fixes: 5a087e056f ("cgroups: don't escape if lxc.cgroup.keep is true")
Suggested-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2018-10-11 15:30:01 +02:00
Stéphane Graber
d354a97d6a
Merge pull request #2687 from brauner/2018-10-10/fix_verify_start_hooks
conf: verify_start_hooks() after lxc.mount.entry
2018-10-10 11:04:42 -04:00
Christian Brauner
75193660db
conf: verify_start_hooks() after lxc.mount.entry
Fixes: https://discuss.linuxcontainers.org/t/are-lxc-mount-entry-available-when-lxc-hook-start-is-validated/2906/3
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-10 16:40:10 +02:00
Stéphane Graber
8a2ae1647d
Merge pull request #2688 from brauner/2018-10-10/cgfsng_fix_monitor_cpuset_deletion
cgfsng: ensure initialized cpuset controller
2018-10-10 10:34:58 -04:00
Stéphane Graber
a41d704a24
Merge pull request #2689 from brauner/2018-10-10/log_prlimit
conf: log prlimit setup
2018-10-10 10:34:35 -04:00
Christian Brauner
2de12765e2
conf: log prlimit setup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-10 13:53:00 +02:00
Christian Brauner
b5769f7026
Merge pull request #2686 from 2xsec/rpm
fix rpm packaging error for static library
2018-10-10 13:43:10 +02:00
Christian Brauner
ecedb5dee9
cgfsng: ensure initialized cpuset controller
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-10 13:27:45 +02:00
2xsec
3b15904166
fix post section script error for rpm install
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-10 18:51:26 +09:00
2xsec
7701a78d8f
fix rpm packaging error for static library
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-10 18:21:41 +09:00
2xsec
af5e7ee11b
parse: fix uninitialized pointer access
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-10 15:00:45 +09:00
2xsec
8392708ef3
confile: remove unused variable
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-10 14:50:32 +09:00
Stéphane Graber
d523cf5982
Merge pull request #2684 from brauner/2018-10-10/cgfsng_improve_logging
cgfsng: improve deletion and logging
2018-10-09 19:23:55 -04:00
Christian Brauner
d5fc4dd406
cgfsng: improve loggin on monitor cgroup destroy
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-10 00:03:13 +02:00
Christian Brauner
23e5c04580
cgfsng: fix lxc.pivot directory creation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-10 00:02:46 +02:00
Stéphane Graber
e2103b180a
Merge pull request #2681 from brauner/2018-10-08/adapt_netns_ifaddrs_to_new_kernel
netns_ifaddrs: support NETLINK_DUMP_STRICT_CHK
2018-10-08 17:06:58 -04:00
Stéphane Graber
373376b257
Merge pull request #2682 from brauner/2018-10-08/fix_config_parsing
parse: do not mask failed parse
2018-10-08 17:05:43 -04:00
Christian Brauner
646e6c8b46
test: test invalid config keys
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-08 22:53:16 +02:00
Christian Brauner
576fb366f8
parse: do not mask failed parse
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-08 22:49:57 +02:00
Christian Brauner
c6b647205d
netns_ifaddrs: check for NETLINK_DUMP_STRICT_CHK
Make use of the new socket option, NETLINK_DUMP_STRICT_CHK, that
userspace can use via setsockopt to request strict checking of headers
and attributes on dump requests.

To get dump features such as kernel side filtering based on data in
the header or attributes appended to the dump request, userspace
must call setsockopt() for NETLINK_DUMP_STRICT_CHK and a non-zero
value. This is necessary to make use of the IFA_TARGET_NETNSID property.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-08 21:13:44 +02:00
Christian Brauner
d38f5b17b7
macro: add SOL_NETLINK
This allows to set netlink socket properties.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-08 21:13:44 +02:00
Christian Brauner
8df6fa99bf
macro: add NETLINK_DUMP_STRICT_CHK
This adds support for the new socket option, NETLINK_DUMP_STRICT_CHK,
that userspace can use via setsockopt to request strict checking of
headers and attributes on dump requests.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-08 21:12:24 +02:00
Stéphane Graber
27ebf8a17d
Merge pull request #2680 from brauner/2018-10-08/fix_android
attach: fix missing pthread.h include
2018-10-08 11:42:13 -04:00
Christian Brauner
0bece47700
attach: fix missing pthread.h include
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-08 17:20:08 +02:00
Christian Brauner
e15b23027c
Merge pull request #2679 from 2xsec/bugfix
start: change log level
2018-10-08 10:35:02 +02:00
2xsec
3e9bde7e8e
file_utils: fix too wide or inconsistent non-owner permissions
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-08 16:37:40 +09:00
2xsec
4752343f82
start: change log level
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-08 16:24:53 +09:00
Stéphane Graber
cb2ce6d03e
Merge pull request #2674 from brauner/2018-10-07/protect_errno
parse: tweak config parsing
2018-10-07 16:22:08 -04:00
Stéphane Graber
8f355cad21
Merge pull request #2677 from brauner/2018-10-07/attach_reset_signal_mask
attach: reset signal mask
2018-10-07 16:21:26 -04:00
Christian Brauner
f157b05636
attach: reset signal mask
Since we introduced clean exit from the mainloop when SIGTERM is sent we
changed the signal mask of the parent process but we never reset the
signal mask for the actual attached process.

Closes #399.

Fixes: 1349e92e4d ("console: exit mainloop on SIGTERM")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-07 11:50:23 +02:00
Christian Brauner
acf67bc962
Merge pull request #2676 from 2xsec/bugfix
doc: Add -u and -g args to Korean lxc-attach(1) and lxc-execute(1)
2018-10-07 11:48:24 +02:00
Wolfgang Bumiller
969e23f2e1
Merge pull request #2675 from brauner/2018-10-07/path_max
tree-wide: s/MAXPATHLEN/PATH_MAX/g
2018-10-07 10:43:08 +02:00
2xsec
737f5220a2 doc: Add -u and -g args to Korean lxc-attach(1) and lxc-execute(1)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-07 17:37:43 +09:00
Christian Brauner
3a5996ff0c
tools: s/MAXPATHLEN/PATH_MAX/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-07 10:09:00 +02:00
Christian Brauner
339de297af
storage: s/MAXPATHLEN/PATH_MAX/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-07 10:06:52 +02:00
Christian Brauner
d726953a23
utils: s/MAXPATHLEN/PATH_MAX/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-07 10:04:15 +02:00
Christian Brauner
8c880e57d7
terminal: s/MAXPATHLEN/PATH_MAX/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-10-07 10:03:55 +02:00