Commit Graph

11279 Commits

Author SHA1 Message Date
Stéphane Graber
df05cddc83
meson: Remove non-existent tests
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-04-28 17:55:11 -04:00
Stéphane Graber
5a7b9ce677
Merge pull request #4101 from memnoth/fix-fail-exec-dnsmasq
lxc-net.in: fix failure executing dnsmasq
2022-04-02 20:33:25 -04:00
Leesoo Ahn
f97607e02c lxc-net.in: fix failure executing dnsmasq
Failure executing dnsmasq happens if misc dir is not existed as the
following error messages.

localhost.localdomain systemd[1]: Starting LXC network bridge setup...
localhost.localdomain lxc-net[5754]: dnsmasq: cannot open or create lease file /usr/local/var/lib/misc/dnsmasq.lxcbr0.leases: No such file or directory
localhost.localdomain dnsmasq[5754]: cannot open or create lease file /usr/local/var/lib/misc/dnsmasq.lxcbr0.leases: No such file or directory
localhost.localdomain dnsmasq[5754]: FAILED to start up
localhost.localdomain lxc-net[5727]: Failed to setup lxc-net.
localhost.localdomain lxc-net[5727]: Failed to setup lxc-net.
localhost.localdomain systemd[1]: lxc-net.service: Main process exited, code=exited, status=1/FAILURE
localhost.localdomain systemd[1]: lxc-net.service: Failed with result 'exit-code'.
localhost.localdomain systemd[1]: Failed to start LXC network bridge setup.

Modify 'lxc-net' script to call 'mkdir -p' command if the directory is not
existed before executing dnsmasq daemon.

Signed-off-by: Leesoo Ahn <lsahn@ooseel.net>
2022-04-02 20:23:21 +09:00
Stéphane Graber
d09a31dba6
Merge pull request #4099 from corubba/feature/stop-order
tools: lxc-autostart: Reverse order on stop
2022-03-30 11:40:16 -04:00
corubba
8f8d14f72d tools: lxc-autostart: Reverse order on stop
As it was already discussed in lxc/lxd#2082, containers should be
stopped in the opposite order they are started in. LXD does so already,
lxc should do the same.

Signed-off-by: Corubba Smith <corubba@gmx.de>
2022-03-27 01:36:20 +01:00
Christian Brauner
4ad335d07a
Merge pull request #4098 from memnoth/mnth/fastpath-mkdir_p
utils: add fastpath routine on mkdir_p function
2022-03-26 17:40:02 +01:00
Leesoo Ahn
0a0911faee utils: add fastpath routine on mkdir_p function
Call 'access' to examine whether 'dir' is already existed or not instead
of directly calling 'mkdir' on each dir name separated by slash '/' even though
'dir' is existed.

Signed-off-by: Leesoo Ahn <lsahn@ooseel.net>
2022-03-26 22:22:10 +09:00
Stéphane Graber
90a9b72667
Merge pull request #4096 from brauner/2022-03-22.meson
build: add more tests to meson
2022-03-23 12:57:19 -04:00
Christian Brauner
cf9e29f352
build: add more tests to meson
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-03-23 16:11:00 +01:00
Christian Brauner
44c22b8a95
tests: fix include statements
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-03-23 16:10:48 +01:00
Stéphane Graber
c8f5432d54
Merge pull request #4095 from brauner/2022-03-22.meson
build: add tests to meson
2022-03-22 09:40:44 -04:00
Christian Brauner (Microsoft)
2cf04d6695
build: add tests to meson
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-03-22 08:48:43 +01:00
Stéphane Graber
30ebf0964d
Merge pull request #4091 from JamiKettunen/non-modular-kernels
lxc-checkconfig: Only check probed modules if /proc/modules exists
2022-03-09 17:14:05 +01:00
Jami Kettunen
b7affe5264 lxc-checkconfig: Only check probed modules if /proc/modules exists
Kernels can be built with CONFIG_MODULES=n which results in
is_probed() telling the module isn't probed and lsmod spamming the
following to stderr each time it's called:

  libkmod: kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
  Error: could not get list of modules: No such file or directory

Fix this by "stubbing" is_probed() when /proc/modules doesn't exist
as it's always called after a is_enabled() anyway.

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
2022-03-08 12:37:08 +02:00
Stéphane Graber
2ff64429ec
Merge pull request #4090 from brauner/2022-02-22.fixes.4
cgroups: modify cgroup2 attach logic
2022-02-24 11:32:30 -05:00
Christian Brauner
2e67b0d47f
cgroups: modify cgroup2 attach logic
Recent kernels have seen various permission checking fixes when moving
processes into cgroups. So we're forced to modify how we attach to
containers.

Link: https://discuss.linuxcontainers.org/t/lxd-4-23-unable-to-start-nested-containers
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-23 15:58:27 +01:00
Stéphane Graber
642052d58c
Merge pull request #4089 from brauner/2022-02-22.fixes
ttys: ensure container_ttys= env variable is set correctly
2022-02-22 10:52:37 -05:00
Christian Brauner
3b9f84fd23
ttys: ensure container_ttys= env variable is set correctly
Fixes: #4088
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-22 12:20:15 +01:00
Christian Brauner
96a30fe95b
Merge pull request #4087 from tenforward/japanese
doc: Fix reverse allowlist/denylist in Japanese man page
2022-02-21 14:32:10 +01:00
KATOH Yasufumi
302a87291c doc: Fix reverse allowlist/denylist in Japanese man page
Update for commit 2965130c45

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2022-02-21 22:17:36 +09:00
Stéphane Graber
fd115a7359
Merge pull request #4085 from brauner/2022-02-20.cgroup.fixes
cgroups: fixes
2022-02-20 14:53:07 -05:00
Christian Brauner
f7abb27245
cgroups: log fd of newly created cgroup
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-20 15:52:10 +01:00
Christian Brauner
c090dbedbd
cgroups: check that opened file descriptor is a cgroup filesystem
Link: https://discuss.linuxcontainers.org/t/lxd-4-23-unable-to-start-nested-containers/13416
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-02-20 15:47:28 +01:00
Christian Brauner
cc07e2d6c0
Merge pull request #4078 from stgraber/master
lxc-checkconfig: Fix bashism
2022-02-03 07:08:40 +01:00
Stéphane Graber
2965130c45
doc: Fix reverse allowlist/denylist
Reported at: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1957934
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-02-02 21:28:58 -05:00
Stéphane Graber
903b1996b9
lxc-checkconfig: Fix bashism
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-02-02 21:11:09 -05:00
Stéphane Graber
73bc39ac8c
Merge pull request #4077 from terceiro/lxc-net-on-lxc
lxc-net: don't start by default inside lxc
2022-02-02 13:35:09 -05:00
Antonio Terceiro
b9dd36af0c lxc-net: don't start by default inside lxc
When lxc is installed inside an lxc container, trying to bring up
lxc-net with the default parameters will conflict with the networking
setup for lxc on the host. This breaks all networking inside the
container where lxc is installed.

Signed-off-by: Antonio Terceiro <terceiro@debian.org>
2022-02-02 15:14:09 -03:00
Stéphane Graber
97592484fa
Merge pull request #4069 from brauner/2021-01-21.fixes
lxccontainer: allow xdev when creating the container dir
2022-01-21 07:47:07 -05:00
Christian Brauner
1238fee01b
lxccontainer: allow xdev when creating the container dir
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-21 09:44:01 +01:00
Christian Brauner
a368b91a90
Merge pull request #4065 from stgraber/master
github: Clear default ACL on /home
2022-01-20 18:06:53 +01:00
Stéphane Graber
4188864e22
github: Clear default ACL on /home
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-01-20 11:31:24 -05:00
Stéphane Graber
55d6e49efe
Merge pull request #4066 from brauner/2022-01-18.fixes.2
conf, lxccontainer, build: fixes
2022-01-20 08:43:50 -05:00
Christian Brauner
8c1c30368a
github: add systemd-coredump
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:58:58 +01:00
Christian Brauner
a434e4d4f3
github: more detailed compilation instructions
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:58:58 +01:00
Christian Brauner
617efa73e1
github: log system info
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:58:58 +01:00
Christian Brauner
0fd92707a5
github: ensure system liblxc is wiped
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
e53abc4196
lxccontainer: properly wrap lxcapi_create()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
e27637b7b9
build: simplify thread local storage handling
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
f7d3ef8380
build: only enable LTO for regular builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
c123aa042a
lxccontainer: simplify partial file creation
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:59 +01:00
Christian Brauner
0e375b104b
lxccontainer: improve create_partial()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
07ea844f4e
lxccontainer: improve do_lxcapi_create()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
78ffe01108
lxccontainer: improve do_lxcapi_save_config()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
e5af72a666
conf: log termination status
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Christian Brauner
e0f6f149d5
conf: improve userns_exec_mapped_root()
As we do in all other places, first drop groups, then use
setres{g,u}id().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2022-01-20 12:12:58 +01:00
Stéphane Graber
73ff048d66
Merge pull request #4063 from simondeziel/gnupg
github: stop installing gnupg now that it's unused
2022-01-18 10:00:27 -05:00
Simon Deziel
aec7c9c2fa github: stop installing gnupg now that it's unused
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
2022-01-18 09:53:45 -05:00
Christian Brauner
8128bbef4d
Merge pull request #4062 from stgraber/master
lxc-download: Rely on HTTPS only
2022-01-18 15:24:41 +01:00
Stéphane Graber
5852026304
lxc-download: Rely on HTTPS only
GPG has been a major source of issues over the years with various
attacks on the key network as well as client side issues making it hard
to retrieve our keys.

Back when we introduced the image server, SSL certificates were still
expensive and annoying to setup, so not something we'd have expected
potential mirrors to setup for us. They were also issued for multiple
years, making a compromise of such a certificate quite problematic.

But things have changed since, we now have completely free, very easily
deployable SSL certificates everywhere with the majority of those being
shortlived and with good reporting of issued certificates.

With that, we can now deprecate the GPG validation, disable the fallback
to non-HTTPS download and rely on our indices being accurate because
they've been downloaded from a server with a valid certificate.

This puts LXC more in line with what LXD has done since the beginning
and should offer a more reliable user experience.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-01-17 21:15:53 -05:00