Commit Graph

11163 Commits

Author SHA1 Message Date
KATOH Yasufumi
4ced441ef9 doc: add loglevels to ja and ko common options
Update for commit 44b87e8

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2021-10-23 14:45:13 +09:00
Christian Brauner
41687b4d08
Merge pull request #4006 from coledishington/master
Make number of rx and tx queues configurable for veths
2021-10-22 19:30:05 +02:00
Cole Dishington
be538b8b27 Make number of rx and tx queues configurable for veths
Distribute traffic over cpu cores of container by configuring more
than 1 tx/rx queue.

Signed-off-by: Cole Dishington <Cole.Dishington@alliedtelesis.co.nz>
2021-10-22 15:23:38 +13:00
Stéphane Graber
0cbc89cef7
Merge pull request #4005 from brauner/2021-10-21.fixes
conf: allow users to specify that they want a cgroup2 layout on a hybrid host
2021-10-21 10:59:19 -04:00
Christian Brauner
d90d30072c
conf: add cgroup2, cgroup2:ro, cgroup2:force, cgroup2:ro:force options
We keep running into situations where we want to pre-mount a pure
cgroup2 layout regardless of the layout of the host.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-21 16:40:16 +02:00
Christian Brauner
62054cf35e
conf: make it more obvious how auto-mount flags are defined
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-21 15:52:15 +02:00
Stéphane Graber
94e0a5292f
Merge pull request #4004 from brauner/2021-10-20.fixes.2
criu: support restoring containers with pre-created veth devices
2021-10-20 09:51:49 -04:00
Christian Brauner
0109a13d53
criu: support restoring containers with pre-created veth devices
We did th CRIU and kernel work but for some reason we never did push the
LXC work.

Link: cdb0d42702
      commit cdb0d427020f ("net: allow restoring of precreated veth devices")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-20 14:52:18 +02:00
Stéphane Graber
2db3d91eea
Merge pull request #4003 from brauner/2021-10-19.fixes
conf: verify that rootfs is stable after setting up mounts
2021-10-19 11:24:26 -04:00
Christian Brauner
4f2af104b8
conf: verify that rootfs is stable after setting up mounts
Apparently some users changed their rootfs via their lxc.mount.entry
entries. Let's not allow that as that can cause confusion during
container setup. So lets verify that the rootfs is stable after setup.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-19 16:59:41 +02:00
Stéphane Graber
7af27b3290
Merge pull request #4002 from xypron/riscv64
Riscv64
2021-10-19 10:58:23 -04:00
Heinrich Schuchardt
0a2ffe123c README.md: mention RISC-V architecture
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-19 13:21:51 +02:00
Heinrich Schuchardt
07459c88d5 Add riscv64 to --arch parameter values
lxc-attach uses an --arch parameter. 'riscv64' should be a usable value.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-19 13:18:02 +02:00
Stéphane Graber
81738fe0fc
Merge pull request #4000 from brauner/2021-10-18.fixes
conf: fixes
2021-10-18 10:01:24 -04:00
Christian Brauner
5c6eb4169a
conf: don't fail umount2()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-18 12:07:37 +02:00
Christian Brauner
65d832931b
conf: fix coding style
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-18 11:46:16 +02:00
Stéphane Graber
27d9212bf8
Merge pull request #3997 from brauner/2021-10-15.fixes
log: fixes
2021-10-15 09:19:47 -04:00
Christian Brauner
a031a4e14f
caps: ensure \0-termination
Fixes: Coverity 1492865
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-15 11:29:27 +02:00
Christian Brauner
bf2af3e72a
attach: improve error logging
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-15 10:06:48 +02:00
Christian Brauner
d8487b3081
af_unix: replace log_error_errno()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-15 09:59:28 +02:00
Stéphane Graber
1c39a913df
Merge pull request #3996 from tych0/fix-criu-log
criu: fix error message
2021-10-14 13:02:36 -04:00
Tycho Andersen
bdb8aeda72 criu: fix error message
as of 59d8a539d1 ("criu: massage exec_criu()") I see:

In file included from criu.c:22:
criu.c: In function 'exec_criu':
log.h:376:2: error: '%s' directive argument is null [-Werror=format-overflow=]
  376 |  LXC_ERROR(&locinfo, format, ##__VA_ARGS__);   \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
log.h:457:3: note: in expansion of macro 'ERROR'
  457 |   ERROR("%s - " format, ptr, ##__VA_ARGS__); \
      |   ^~~~~
log.h:491:3: note: in expansion of macro 'SYSERROR'
  491 |   SYSERROR(format, ##__VA_ARGS__);              \
      |   ^~~~~~~~
criu.c:325:11: note: in expansion of macro 'log_error_errno'
  325 |    return log_error_errno(-ENOMEM, ENOMEM, "Failed to remove extraneous slashes from \"%s\"", tmp);
      |           ^~~~~~~~~~~~~~~

it looks like we should be logging the string that failed, vs. tmp here.

(my log was taken from stable-4.0, but the same issue exists on master it
seems.)

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
2021-10-14 10:41:36 -06:00
Stéphane Graber
b2668c872f
Merge pull request #3995 from brauner/2021-10-13.fixes
tree-wide: capability tests and fixes
2021-10-14 10:38:18 -04:00
Christian Brauner
8a0de7e7cc
test: fix nested capability tests
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 14:03:49 +02:00
Christian Brauner
401b1364b3
attach: improve error logging for drop_capabilities()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 13:26:15 +02:00
Christian Brauner
09f2a3ef8a
tests: expand capability tests
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 11:17:15 +02:00
Christian Brauner
7418b27f12
tree-wide: use __u32 for capabilities
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-14 11:04:06 +02:00
Christian Brauner
c5e7fbcadb
cgroups: use __u32 for cpumasks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-13 18:30:00 +02:00
Stéphane Graber
f64fa52667
Merge pull request #3994 from brauner/2021-10-12.fixes
conf: improve and fix lxc.cap.keep
2021-10-13 09:25:59 -04:00
Christian Brauner
623f47b00c
conf: improve capability handling
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-13 13:38:14 +02:00
Christian Brauner
634b43e1f2
tests: add test for lxc.cap.keep
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-13 13:08:01 +02:00
Christian Brauner
cafcd2a751
conf: fix lxc.cap.keep behavior
Fixes: ##3993
Fixes: 20ab75789e ("conf: simplify and port caps to new list type")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-12 16:33:14 +02:00
Stéphane Graber
8305ff8ab0
Merge pull request #3992 from brauner/2021-10-11.fixes
terminal: log at warning message
2021-10-11 10:30:46 -04:00
Christian Brauner
0cf017f071
terminal: log at warning message
The lxc_devpts_terminal() helper is called in contexts where it can fail
due to various reasons but where we safely fallback to allocating
terminal devices on the host. Logging error messages irritates users so
just log warning messages.

Link: https://discuss.linuxcontainers.org/t/lxc-attach-error-failed-to-open-terminal-multiplexer-device
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-11 15:22:52 +02:00
Stéphane Graber
15f29e6fb7
Merge pull request #3988 from brauner/2021-10-04.fixes
log: improve %m handling on musl
2021-10-04 09:14:18 -04:00
Christian Brauner
316b8d0589
log: improve %m handling on musl
Fixes: #3961
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-04 11:24:19 +02:00
Stéphane Graber
d63b84d89b
Merge pull request #3987 from brauner/2021-10-01.fixes
start: make failure to apply core scheduling fatal
2021-10-01 10:33:23 -04:00
Christian Brauner
ffd98e8c2e
start: make failure to apply core scheduling fatal
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 15:35:03 +02:00
Stéphane Graber
b8b2e1f331
Merge pull request #3986 from brauner/2021-10-01.fixes
lxc: core scheduling tweaks
2021-10-01 08:52:01 -04:00
Christian Brauner
f18a595926
start: use core scheduling error helper
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 10:14:08 +02:00
Christian Brauner
565b6e92d3
start: don't fail when core scheduling isn't supported
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 10:12:43 +02:00
Christian Brauner
47bfecf510
syscall_wrappers: fix core scheduling creation helper naming
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-01 10:12:17 +02:00
Stéphane Graber
15e9cc882f
Merge pull request #3985 from brauner/2021-09-30.fixes.2
tree-wide: cast to core scheduling cookie to llu
2021-09-30 17:17:07 -04:00
Christian Brauner
2e9aa14628
tree-wide: cast to core scheduling cookie to llu
Link: https://launchpadlibrarian.net/561086365/buildlog_ubuntu-focal-ppc64el.lxc_1%3A4.0.10+master~20210930-1812-0ubuntu1~focal_BUILDING.txt.gz
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-30 22:48:29 +02:00
Stéphane Graber
187560436a
Merge pull request #3984 from brauner/2021-09-29.core_scheduling
lxc: core scheduling support
2021-09-30 13:56:25 -04:00
Christian Brauner
c958a332d2
attach: handle core scheduling
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-30 17:43:22 +02:00
Stéphane Graber
177f5c95dc
Merge pull request #3983 from brauner/2021-09-29.fixes
build: compiler attribute improvements
2021-09-29 12:45:09 -04:00
Christian Brauner
09996a4821
lxc: add lxc.sched.core
Core scheduling defines if the container payload is marked as being
schedulable on the same core. Doing so will cause the kernel scheduler
to ensure that tasks that are not in the same group never run
simultaneously on a core. This can serve as an extra security measure to
prevent the container payload from using cross hyper thread attacks.

The only allowed values are 0 and 1. Set this to 1 to create a core
scheduling domain for the container or 0 to not create one. If not set
explicitly no core scheduling domain will be created for the container.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-29 14:07:41 +02:00
Christian Brauner
b371ad51bb
initutils: add missing prctl include
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-29 13:16:05 +02:00
Christian Brauner
ae13cb3b1b
build: compiler attribute improvements
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-29 10:17:33 +02:00