Stéphane Graber
750012991f
Merge pull request #3204 from brauner/switch_to_spdx
...
lxc: switch to SPDX
2019-12-04 09:59:20 -05:00
Stéphane Graber
8a7d02b712
Merge pull request #3207 from brauner/cgroup2_improvements_2
...
cgroups: improve container cgroup attaching
2019-12-04 09:57:57 -05:00
Christian Brauner
9994db5125
cgroups/devices: correctly verify bpf device useability in cgfsng_devices_activate()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-04 14:03:48 +01:00
Christian Brauner
900b660658
cgroups: improve container cgroup attaching
...
The current attach.c codepath which handles moving the attaching process into
the container's cgroups allocates a whole new struct cgroup_ops and goes
through the trouble of reparsing the whole cgroup layout.
That's costly and wasteful. My plan has always been to move this into the
command api by getting fds for attaching back but but it's not worth going
through that hazzle for non-unified hosts. On pure unified hosts however -
being the future - we can just attach through a single fd so there's no need to
allocate and setup struct cgroup_ops.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-04 13:53:56 +01:00
Christian Brauner
cc73685dd0
lxc: switch to SPDX
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-04 13:48:46 +01:00
Christian Brauner
23a917e5d2
commands: use logging return helpers
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-04 13:26:23 +01:00
Stéphane Graber
c10ac1b13b
Merge pull request #3205 from brauner/cgroup2_improvements
...
cgroup: add command to retrieve cgroup2 fd and rework cgroup2 attach
2019-12-03 22:57:08 -05:00
Christian Brauner
bad788b08f
cgfsng: rework cgroup2 attach
...
On pure unified systemd we can use a single file descriptor to interact with
the cgroup filesystem. Add a method to retrieve it and as a start use it in our
unified attach codepath.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-04 02:56:25 +01:00
Christian Brauner
6900ebfa2d
cgroups/devices: do not log error when bpf device feature is not available
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-04 00:55:42 +01:00
Stéphane Graber
02294d4ef7
Merge pull request #3203 from brauner/freezer_fixes
...
freezer: cleanup
2019-12-03 17:41:11 -05:00
Christian Brauner
397572003c
Merge pull request #2842 from brauner/2019-02-11/fix_licensing
...
tree-wide: Fix inconsistent license headers
2019-12-03 20:39:25 +01:00
Christian Brauner
d47ff01b75
freezer: cleanup
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-03 20:35:45 +01:00
Christian Brauner
22f0dd49ae
Merge pull request #3178 from xinhua9569/master
...
conf: fix memory leak for set config rootfs options
2019-12-03 20:25:18 +01:00
Stéphane Graber
9c3f1c584b
Merge pull request #3202 from brauner/cgroup2_freezer_fixes
...
cgroups/freezer: rework cgroup2 freezer feature usage
2019-12-03 10:34:49 -05:00
Christian Brauner
018051e37d
cgroups/freezer: fix and improve cgroup2 freezer implementation
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-03 16:07:07 +01:00
Christian Brauner
dca9587a61
cgroups: add DEFAULT_MOUNTPOINT #define
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-03 15:37:53 +01:00
Stéphane Graber
9346110a46
Merge pull request #3196 from brauner/cgroup2_devices_fixes_2
...
cgroups/devices: use dedicated enums
2019-12-01 20:52:08 -05:00
Christian Brauner
356e71c616
cgroups/devices: use dedicated enums
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-02 00:50:06 +01:00
Stéphane Graber
3e32a62647
Merge pull request #3195 from brauner/cgroup2_devices_fixes
...
cgroup2: add bpf device controller live update
2019-12-01 15:17:34 -05:00
Christian Brauner
fda39d451e
cgroups/devices: introduce ebpf device cgroup global rule types
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 19:39:48 +01:00
Christian Brauner
30da741c50
cgroups/devices: handle NULL
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 19:08:43 +01:00
Christian Brauner
68a9e3ebcb
configure: enable -Wunused-but-set-variable
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 17:07:25 +01:00
Christian Brauner
2a63b5cb7f
cgroups/cgfsng: implement cgroup2 device controller live update
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 17:07:23 +01:00
Christian Brauner
4bfb655ea8
conf: record cgroup2 devices in parsed format
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 11:56:43 +01:00
Christian Brauner
cce5a3d716
cgroups/cgfsng: "atomically" replace bpf device programs
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 11:56:43 +01:00
Christian Brauner
46383a85a9
macro: remove unused macros
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 11:56:43 +01:00
Christian Brauner
e4dffa2f97
api_extension: add cgroup2_devices api extension
...
This will only be defined if liblxc was even compiled with bpf supported.
Support itself will be determined at runtime by liblxc itself.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-12-01 11:56:43 +01:00
Stéphane Graber
637de040ae
Merge pull request #3194 from brauner/cgroup2_devices
...
cgroups: add cgroup2 device controller support
2019-11-29 14:28:27 -05:00
Christian Brauner
bf6519892e
cgroups: add cgroup2 device controller support
...
Add a bpf-based device controller implementation.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-11-29 17:10:13 +01:00
Christian Brauner
5f31d8f1dd
Merge pull request #3193 from lifeng68/master
...
cgfsng: return attach fail if container stopped
2019-11-27 09:17:37 +01:00
LiFeng
e2cb2e749f
cgfsng: return attach fail if container stopped
...
Signed-off-by: LiFeng <lifeng68@huawei.com>
2019-11-27 03:59:23 -05:00
dongxinhua
9dd7598161
conf: fix memory leak for set config rootfs options
...
Signed-off-by: dongxinhua <dongxinhua@huawei.com>
2019-11-21 22:20:20 +08:00
Stéphane Graber
f177506f59
Merge pull request #3190 from idatahu/fix_ovs_log
...
fix wrong order of bridge/nic in error message
2019-11-20 16:44:06 -05:00
Balázs Póka
53796b941e
fix wrong order of bridge/nic in error message
...
Signed-off-by: Balázs Póka <poka@idata.hu>
2019-11-20 21:06:23 +01:00
Christian Brauner
e166e391f4
Merge pull request #3189 from Rachid-Koucha/patch-2
...
Typo in a comment
2019-11-20 13:05:46 +01:00
Rachid Koucha
317494f100
Typo in a comment
...
"above" was used instead of "below"
Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
2019-11-20 13:03:47 +01:00
Stéphane Graber
4d6e32a55e
Merge pull request #3187 from brauner/launchpad_bug_1848587
...
tests: use /dev/null instead of /dev/network_latency
2019-11-19 12:29:58 -05:00
Christian Brauner
920cbb0026
tests: use /dev/loop-control instead of /dev/network_latency
...
BugLink: https://bugs.launchpad.net/bugs/1848587
The latter device has been removed apparently.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-11-19 16:53:03 +01:00
Christian Brauner
d396dd9d85
Merge pull request #3184 from ffontaine/master
...
configure.ac: fix build on toolchain without SSP
2019-11-11 23:22:19 +01:00
Fabrice Fontaine
226205f0c5
configure.ac: fix build on toolchain without SSP
...
Commit 3b5a0eebd4
reverted
3aa7271157
resulting in lxc being unable
to be built on toolchain without SSP support
Fixes:
- http://autobuild.buildroot.org/results/57945f54ffbc5c8764b6891a4516c4907e56ab97
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-11-11 22:55:36 +01:00
Stéphane Graber
234507c29a
Merge pull request #3182 from aadi123/master
...
Update cgroup.h
2019-11-09 13:49:27 -05:00
Aaditya Murthy
c8714832a9
Update cgroup.h
...
Fixed the documentation to say that cgroupv2 uses a unified hierarchy
Signed-off-by: Aaditya Murthy <amurthy123@utexas.edu>
2019-11-09 12:17:08 -06:00
Stéphane Graber
d61197e8c9
Merge pull request #3180 from brauner/2019-11-06/terminal_fixes
...
terminal: bugfixes
2019-11-06 08:39:10 -05:00
Christian Brauner
1ba4ae8979
terminal: prevent returning invalid pointer
...
Closes: https://github.com/lxc/lxd/issues/6408
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-11-06 14:08:55 +01:00
Christian Brauner
26ed61e081
terminal: make lxc_terminal_signal_fini() static
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2019-11-06 14:03:43 +01:00
Christian Brauner
e07039d134
Merge pull request #3177 from hallyn/2019-11-01/mapself
...
lxc-usernsexec: support easily mapping own uid
2019-11-04 15:44:11 +01:00
Serge Hallyn
81d15993cc
lxc-usernsexec: support easily mapping own uid
...
Signed-off-by: Serge Hallyn <shallyn@cisco.com>
2019-11-02 08:28:51 -05:00
Christian Brauner
f09700dab2
Merge pull request #3175 from ralt/pr/execute-attach-exit-code-tests
...
tests: add tests making sure the exit code is appropriate.
2019-10-30 12:10:00 +01:00
Florian Margaine
188f8836a4
tests: add tests making sure the exit code is appropriate.
...
lxc2 broke this feature for lxc-execute, and lxc3 broke it for
lxc-attach. This adds a test making sure we don't do the same mistake
a third time.
Signed-off-by: Florian Margaine <florian@platform.sh>
2019-10-29 20:52:03 +01:00
Stéphane Graber
202d2ca3c2
Merge pull request #3174 from Blub/2019-10-29/terminal-init-null-on-error
...
terminal: return NULL on error in terminal_signal_init
2019-10-29 09:29:17 +01:00