Commit Graph

11006 Commits

Author SHA1 Message Date
Christian Brauner
0627ffc0c6
cgroups: use semantically clean check in cpuset1_cpus_initialize()
The variable is a pointer not a integer.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-16 10:56:51 +02:00
Stéphane Graber
6f76b9e528
Merge pull request #3937 from brauner/2021-08-13.fixes
cgroups: cpumask fixes
2021-08-14 11:12:27 -04:00
Christian Brauner
f5bc57d23c
cgroups: fix cpumask handling
Link: https://discuss.linuxcontainers.org/t/lxc-4-0-9-lxc-start-sigabrt-on-systems-with-defined-offline-cpus-and-a-total-number-of-cpus-divisible-by-32
Signed-off-by: Jim Ferrigno <jim.ferrigno@oracle.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-14 00:39:03 +02:00
Christian Brauner
21e84b0205
cgroups: fix comments in cpuset1_initialize()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-13 21:37:02 +02:00
Christian Brauner
f6949b6993
Revert "cgroups: fix cpu bitmasks"
This reverts commit e0f7296a6d.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-13 21:35:30 +02:00
Christian Brauner
fb40641cac
Merge pull request #3934 from brauner/2021-08-12.fixes
cgroups: cpumask fixes
2021-08-12 10:12:45 +02:00
Christian Brauner
7e80755d0c
cgroups: s/calloc/zalloc/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-12 09:00:00 +02:00
Jim Ferrigno
e0f7296a6d
cgroups: fix cpu bitmasks
Link: https://discuss.linuxcontainers.org/t/lxc-4-0-9-lxc-start-sigabrt-on-systems-with-defined-offline-cpus-and-a-total-number-of-cpus-divisible-by-32
Signed-off-by: Jim Ferrigno <jim.ferrigno@oracle.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-12 08:56:04 +02:00
Stéphane Graber
cf92aaac1c
Merge pull request #3899 from denisfa/master
Improve bash completion experience.
2021-08-11 13:42:18 -04:00
Stéphane Graber
ef10e680d5
Merge pull request #3932 from brauner/2021-08-11.fixes
mainloop: further io_uring fixes
2021-08-11 13:22:48 -04:00
Christian Brauner
82abff81b6
mainloop: disable IORING_SETUP_SQPOLL for now
It's a bit more complicated to use then I envisioned here.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-11 17:47:39 +02:00
Christian Brauner
c9d1f58725
mainloop: add comments about multishot and oneshot cleanup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-11 17:47:39 +02:00
Christian Brauner
e5e7c954c5
mainloop: s/handler_name/name/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-11 17:47:39 +02:00
Stéphane Graber
34a16b88c6
Merge pull request #3931 from brauner/2021-08-11.fixes
memory_utils: make cleanup handler as unused
2021-08-11 10:58:21 -04:00
Christian Brauner
96348aa8ab
mainloop: move variables into tighter scope
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-11 15:52:12 +02:00
Christian Brauner
f7050a2d87
memory_utils: make cleanup handler as unused
They are sometimes used to just clean something up automatically at end
of scope but the variables themselves might not be actually used.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-11 15:43:18 +02:00
Stéphane Graber
d5b6db61e2
Merge pull request #3930 from brauner/2021-08-10.fixes
mainloop: io_uring cleanup handling fixes
2021-08-11 09:08:09 -04:00
Christian Brauner
4f142001a8
mainloop: fix io_uring cleanup handling
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-11 11:03:13 +02:00
Christian Brauner
cba2278a10
mainloop: remove CANCEL_RAISE flag
This is really not needed since we're not checking it anywhere anyway.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 17:57:26 +02:00
Christian Brauner
80aa5876b3
mainloop: minor fixes
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 17:42:41 +02:00
Christian Brauner
fa21f71fef
Merge pull request #3928 from simondeziel/download-user-agent
lxc-download: customize the user-agent to include LXC package version and compat level
2021-08-10 17:09:06 +02:00
Christian Brauner
4c56d112a6
Merge pull request #3929 from tych0/fix-sys-poll-warning
mainloop: s,sys/poll,poll
2021-08-10 17:07:19 +02:00
Tycho Andersen
1551ac0791 mainloop: s,sys/poll,poll
I get the following warning (which then fails the build because of
-Werror):

In file included from mainloop.c:11:
/usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror=cpp]
    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
      |  ^~~~~~~

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
2021-08-10 08:45:21 -06:00
Simon Deziel
dcc08eb562 lxc-download: add LXC version/compat level to user-agent
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
2021-08-10 10:35:48 -04:00
Stéphane Graber
a399d7ead0
Merge pull request #3924 from brauner/2021-06-04.io_uring
mainloop: io_uring support
2021-08-10 10:01:55 -04:00
Christian Brauner
543d2f838c
mainloop: add io_uring support
Users can choose to compile liblxc with io_uring support. This will
cause LXC to use io_uring instead of epoll.
We're using both, io_uring's one-shot and multi-shot poll mode depending
on the type of handler.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 14:33:48 +02:00
Christian Brauner
5dab527cb7
Merge pull request #3927 from tomponline/tp-nic-address-broadcast
doc: Adds mention of ability to specify manual IPv4 broadcast address
2021-08-10 13:03:10 +02:00
Thomas Parrott
5686798d8e doc: Adds mention of ability to specify manual IPv4 broadcast address
See also https://github.com/lxc/lxd/pull/9103

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
2021-08-10 11:32:30 +01:00
Christian Brauner
3298b37d53
tree-wide: s/lxc_epoll_descr/lxc_async_descr/g
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 10:03:13 +02:00
Christian Brauner
d2022f30eb
conf: log session keyring failure on WARN level
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 10:03:13 +02:00
Christian Brauner
0d8d13be20
cgroups: log at warning instead of error level
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-10 10:03:12 +02:00
Christian Brauner
ea3c3688e1
Merge pull request #3926 from stgraber/master
doc/api-extensions: Grammar fix
2021-08-09 19:41:40 +02:00
Stéphane Graber
58795066dc
doc/api-extensions: Grammar fix
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2021-08-09 13:40:49 -04:00
Stéphane Graber
99ada0efc9
Merge pull request #3925 from brauner/2021-08-09.fixes
lsm/apparmor: small fixes
2021-08-09 10:25:07 -04:00
Christian Brauner
a36e286bea
lsm/apparmor: use cleanup macro
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-09 15:59:26 +02:00
Christian Brauner
0e8effda05
lsm/apparmor: log failure to write AppArmor profile
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-09 15:58:53 +02:00
Stéphane Graber
f14d72ba0f
Merge pull request #3923 from brauner/2021-08-05.fixes
network: fix container with empty network namespaces
2021-08-05 11:41:23 -04:00
Christian Brauner
43e2a96494
network: fix container with empty network namespaces
Fixes: #3922
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-05 16:16:33 +02:00
Stéphane Graber
b0a16da45a
Merge pull request #3921 from brauner/2021-08-03.fixes
conf: rootfs mount option fixes
2021-08-03 10:02:27 -04:00
Christian Brauner
587b2dff94
tests: add test for rootfs mount options
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 14:48:51 +02:00
Christian Brauner
704cadd524
conf: allow mount options for rootfs when using new mount api
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 13:16:45 +02:00
Christian Brauner
8cf6a64675
mount_utils: make some mount helpers static inline
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 12:51:24 +02:00
Christian Brauner
0f43436cbe
conf: let parse_vfs_attr() handle legacy mount flags as well
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 12:19:49 +02:00
Christian Brauner
777827cb3a
conf: log failure to create tty mountpoint
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-03 09:22:46 +02:00
Stéphane Graber
fa89ed65fa
Merge pull request #3920 from brauner/2021-08-02.fixes
mount_utils: introduce mount_at()
2021-08-02 14:33:37 -04:00
Christian Brauner
b35f8f7ef5
conf: refactor lxc_recv_ttys_from_child()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-02 19:21:08 +02:00
Christian Brauner
caaa223bc0
conf: fix logging in lxc_idmapped_mounts_child()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-02 18:47:44 +02:00
Christian Brauner
8b0ccdaaf3
mount_utils: introduce mount_at()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-08-02 15:30:03 +02:00
Stéphane Graber
1b8f92fe74
Merge pull request #3919 from brauner/2021-07-31.devpts
terminal: handle kernel without TIOCGPTPEER
2021-07-31 10:54:25 -04:00
Christian Brauner
64ac925fb1
terminal: fail on unknown error during TIOCGPTPEER
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-07-31 10:19:57 +02:00