]> git.ipfire.org Git - thirdparty/lxc.git/log
thirdparty/lxc.git
5 years agolxccontainer: fix non-blocking container stop 3456/head
Robert Vogelgesang [Tue, 23 Jun 2020 08:51:33 +0000 (10:51 +0200)] 
lxccontainer: fix non-blocking container stop

Stopping a lxc container with without waiting on it was broken in master. This
patch fixes it.

Signed-off-by: Robert Vogelgesang <vogel@folz.de>
5 years agoMerge pull request #3454 from brauner/master
Stéphane Graber [Fri, 19 Jun 2020 23:08:19 +0000 (19:08 -0400)] 
Merge pull request #3454 from brauner/master

tree-wide: variable naming update

5 years agotest: update terminology 3454/head
Christian Brauner [Fri, 19 Jun 2020 21:59:46 +0000 (23:59 +0200)] 
test: update terminology

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agodoc: update terminology
Christian Brauner [Fri, 19 Jun 2020 21:58:15 +0000 (23:58 +0200)] 
doc: update terminology

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoCODING_STYLE: adapt code example
Christian Brauner [Fri, 19 Jun 2020 21:55:56 +0000 (23:55 +0200)] 
CODING_STYLE: adapt code example

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoopenpty: adapt variable naming
Christian Brauner [Fri, 19 Jun 2020 21:54:07 +0000 (23:54 +0200)] 
openpty: adapt variable naming

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3453 from stgraber/master
Christian Brauner [Thu, 18 Jun 2020 15:56:52 +0000 (17:56 +0200)] 
Merge pull request #3453 from stgraber/master

network: Rename primary to master

5 years agonetwork: Rename primary to master 3453/head
Stéphane Graber [Thu, 18 Jun 2020 14:28:57 +0000 (10:28 -0400)] 
network: Rename primary to master

The previous change made things confusing by impliying there may be a
secondary when VLAN/IPVLAN/bridge members can only have a single parent
device.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
5 years agoRevert "nl: fix memory leak"
Stéphane Graber [Thu, 18 Jun 2020 14:22:02 +0000 (10:22 -0400)] 
Revert "nl: fix memory leak"

This reverts commit 9d05339487f4e9c4e7f700f963c161a4d9977ae4.

This causes a double-free as the variable is already using __do_free.

Closes #3452

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
5 years agotree-wide: use "primary" in networking code
Christian Brauner [Thu, 18 Jun 2020 08:06:55 +0000 (10:06 +0200)] 
tree-wide: use "primary" in networking code

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotree-wide: wipe references to questionable apis from our public logs
Christian Brauner [Thu, 18 Jun 2020 07:53:34 +0000 (09:53 +0200)] 
tree-wide: wipe references to questionable apis from our public logs

We can't do anything about the established kernel API but we can at least not
propagate the terminology.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotree-wide: use "ptmx" and "pts" as terminal terms
Christian Brauner [Wed, 17 Jun 2020 21:55:32 +0000 (23:55 +0200)] 
tree-wide: use "ptmx" and "pts" as terminal terms

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3449 from gaurav1086/nl_fix_mem_leak
Christian Brauner [Wed, 17 Jun 2020 21:15:25 +0000 (23:15 +0200)] 
Merge pull request #3449 from gaurav1086/nl_fix_mem_leak

nl: fix memory leak

5 years agoMerge pull request #3450 from gaurav1086/containertests_fix_null_ptr_deref
Christian Brauner [Sun, 14 Jun 2020 07:28:39 +0000 (09:28 +0200)] 
Merge pull request #3450 from gaurav1086/containertests_fix_null_ptr_deref

containertests: fix null pointer defereference

5 years agocontainertests: fix null pointer defereference 3450/head
Gaurav Singh [Sat, 13 Jun 2020 23:15:50 +0000 (19:15 -0400)] 
containertests: fix null pointer defereference

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
5 years agonl: fix memory leak 3449/head
Gaurav Singh [Sat, 13 Jun 2020 18:06:04 +0000 (14:06 -0400)] 
nl: fix memory leak

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
5 years agoMerge pull request #3446 from brauner/2020-06-10/fixes_2
Stéphane Graber [Thu, 11 Jun 2020 17:54:05 +0000 (13:54 -0400)] 
Merge pull request #3446 from brauner/2020-06-10/fixes_2

conf: kill old chown_mapped_root()

5 years agolxccontainer: remove pointless string duplication 3446/head
Christian Brauner [Thu, 11 Jun 2020 15:34:08 +0000 (17:34 +0200)] 
lxccontainer: remove pointless string duplication

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: kill old chown_mapped_root()
Christian Brauner [Wed, 10 Jun 2020 21:33:59 +0000 (23:33 +0200)] 
conf: kill old chown_mapped_root()

It's now a wrapper around userns_exec_mapped_root() which allows us to avoid
fork() + exec() lxc-usernsexec makes things way nicer to test with ASAN etc.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: add some more logging to userns_exec_mapped_root()
Christian Brauner [Thu, 11 Jun 2020 16:05:55 +0000 (18:05 +0200)] 
conf: add some more logging to userns_exec_mapped_root()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: always use target_fd in userns_exec_mapped_root()
Christian Brauner [Thu, 11 Jun 2020 16:05:33 +0000 (18:05 +0200)] 
conf: always use target_fd in userns_exec_mapped_root()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoconf: remove faulty flags
Christian Brauner [Thu, 11 Jun 2020 15:30:00 +0000 (17:30 +0200)] 
conf: remove faulty flags

If we set O_RDWR we won't be able to open directories and if we set O_PATH we
won't be able to chown.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3444 from brauner/2020-06-10/fixes
Stéphane Graber [Wed, 10 Jun 2020 17:10:46 +0000 (13:10 -0400)] 
Merge pull request #3444 from brauner/2020-06-10/fixes

cgroups: initialize lxc.pivot cpuset

5 years agocgroups: initialize lxc.pivot cpuset 3444/head
Christian Brauner [Wed, 10 Jun 2020 15:40:56 +0000 (17:40 +0200)] 
cgroups: initialize lxc.pivot cpuset

Closes: #3443.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3442 from tomponline/tp-veth-vlan-coverity
Christian Brauner [Tue, 9 Jun 2020 13:43:18 +0000 (15:43 +0200)] 
Merge pull request #3442 from tomponline/tp-veth-vlan-coverity

Coverity fixes for veth vlan

5 years agonetwork: Adds calls to free_ovs_veth_vlan_args in setup_veth_ovs_bridge_vlan 3442/head
Thomas Parrott [Tue, 9 Jun 2020 12:04:21 +0000 (13:04 +0100)] 
network: Adds calls to free_ovs_veth_vlan_args in setup_veth_ovs_bridge_vlan

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Fix int type in log message
Thomas Parrott [Tue, 9 Jun 2020 12:03:37 +0000 (13:03 +0100)] 
network: Fix int type in log message

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Adds free_ovs_veth_vlan_args and allows trunks field to be freed
Thomas Parrott [Tue, 9 Jun 2020 12:02:54 +0000 (13:02 +0100)] 
network: Adds free_ovs_veth_vlan_args and allows trunks field to be freed

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Removes unused ip_proxy_args
Thomas Parrott [Tue, 9 Jun 2020 12:01:36 +0000 (13:01 +0100)] 
network: Removes unused ip_proxy_args

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Fix coverity issue, dont initialise string pointers in setup_veth_ovs_bridge...
Thomas Parrott [Tue, 9 Jun 2020 11:03:40 +0000 (12:03 +0100)] 
network: Fix coverity issue, dont initialise string pointers in setup_veth_ovs_bridge_vlan

This is needed by lxc_ovs_setup_bridge_vlan_exec.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Fix coverity issue, leaking data in lxc_ovs_setup_bridge_vlan_exec
Thomas Parrott [Tue, 9 Jun 2020 11:03:06 +0000 (12:03 +0100)] 
network: Fix coverity issue, leaking data in lxc_ovs_setup_bridge_vlan_exec

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoconfile: Fix coverity issue, missing return in get_config_net_veth_vlan_tagged_id
Thomas Parrott [Tue, 9 Jun 2020 11:01:41 +0000 (12:01 +0100)] 
confile: Fix coverity issue, missing return in get_config_net_veth_vlan_tagged_id

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoMerge pull request #3439 from tomponline/tp-nic-veth-vlan-ovs
Christian Brauner [Tue, 9 Jun 2020 09:38:36 +0000 (11:38 +0200)] 
Merge pull request #3439 from tomponline/tp-nic-veth-vlan-ovs

NIC: Veth OVS bridge VLAN support

5 years agonetwork: Updates instantiate_veth to support OVS VLAN setup 3439/head
Thomas Parrott [Mon, 8 Jun 2020 10:34:43 +0000 (11:34 +0100)] 
network: Updates instantiate_veth to support OVS VLAN setup

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Adds OVS VLAN setup functions
Thomas Parrott [Mon, 8 Jun 2020 10:34:27 +0000 (11:34 +0100)] 
network: Adds OVS VLAN setup functions

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Updates netlink_open handling in lxc_ipvlan_create 3435/head
Thomas Parrott [Tue, 9 Jun 2020 08:18:55 +0000 (09:18 +0100)] 
network: Updates netlink_open handling in lxc_ipvlan_create

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agodoc: Adds documentation for veth vlan bridge options
Thomas Parrott [Thu, 4 Jun 2020 14:59:58 +0000 (15:59 +0100)] 
doc: Adds documentation for veth vlan bridge options

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Updates instantiate_veth to set bridge vlan settings
Thomas Parrott [Wed, 3 Jun 2020 16:45:47 +0000 (17:45 +0100)] 
network: Updates instantiate_veth to set bridge vlan settings

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Adds bridge vlan management functions
Thomas Parrott [Wed, 3 Jun 2020 16:45:30 +0000 (17:45 +0100)] 
network: Adds bridge vlan management functions

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agotests: Adds test for lxc.net.0.veth.vlan.tagged.id config key
Thomas Parrott [Thu, 4 Jun 2020 13:14:43 +0000 (14:14 +0100)] 
tests: Adds test for lxc.net.0.veth.vlan.tagged.id config key

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agotests: Adds test for bridge vlan "none" value
Thomas Parrott [Thu, 4 Jun 2020 14:27:48 +0000 (15:27 +0100)] 
tests: Adds test for bridge vlan "none" value

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agotests: Adds test for lxc.net.0.veth.vlan.id config key
Thomas Parrott [Wed, 3 Jun 2020 10:08:41 +0000 (11:08 +0100)] 
tests: Adds test for lxc.net.0.veth.vlan.id config key

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoconfile/utils: Adds freeing of priv.veth_attr.vlan_tagged_ids
Thomas Parrott [Wed, 3 Jun 2020 16:44:34 +0000 (17:44 +0100)] 
confile/utils: Adds freeing of priv.veth_attr.vlan_tagged_ids

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoconfile/utils: Adds veth vlan tagged ID tracing to lxc_log_configured_netdevs
Thomas Parrott [Thu, 4 Jun 2020 14:30:34 +0000 (15:30 +0100)] 
confile/utils: Adds veth vlan tagged ID tracing to lxc_log_configured_netdevs

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoconfile/utils: Adds veth mode and vlan ID tracing to lxc_log_configured_netdevs
Thomas Parrott [Wed, 3 Jun 2020 10:07:15 +0000 (11:07 +0100)] 
confile/utils: Adds veth mode and vlan ID tracing to lxc_log_configured_netdevs

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoconfile: Adds validation for lxc.net.veth.vlan.tagged.id
Thomas Parrott [Wed, 3 Jun 2020 16:44:13 +0000 (17:44 +0100)] 
confile: Adds validation for lxc.net.veth.vlan.tagged.id

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoconfile: Adds validation for lxc.net.veth.vlan.id
Thomas Parrott [Wed, 3 Jun 2020 10:06:49 +0000 (11:06 +0100)] 
confile: Adds validation for lxc.net.veth.vlan.id

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Adds veth vlan_id, vlan_id_set and vlan_tagged_ids
Thomas Parrott [Wed, 3 Jun 2020 10:08:19 +0000 (11:08 +0100)] 
network: Adds veth vlan_id, vlan_id_set and vlan_tagged_ids

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agomacro: Adds BRIDGE_VLAN_ID_MAX constant
Thomas Parrott [Thu, 4 Jun 2020 16:02:03 +0000 (17:02 +0100)] 
macro: Adds BRIDGE_VLAN_ID_MAX constant

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agomacro: Adds constant for BRIDGE_VLAN_NONE mode
Thomas Parrott [Thu, 4 Jun 2020 14:27:20 +0000 (15:27 +0100)] 
macro: Adds constant for BRIDGE_VLAN_NONE mode

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agomacro: Adds bridge VLAN constants
Thomas Parrott [Wed, 3 Jun 2020 16:44:55 +0000 (17:44 +0100)] 
macro: Adds bridge VLAN constants

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoapi/extensions: Adds network_bridge_vlan API extension
Thomas Parrott [Thu, 4 Jun 2020 13:16:09 +0000 (14:16 +0100)] 
api/extensions: Adds network_bridge_vlan API extension

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agonetwork: Adds check for bridge link interface existence in instantiate_veth
Thomas Parrott [Wed, 3 Jun 2020 10:26:35 +0000 (11:26 +0100)] 
network: Adds check for bridge link interface existence in instantiate_veth

To avoid misleading errors about openvswitch when non-existent bridge link interface specified.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agomacro: Adds UINT_TO_PTR and PTR_TO_USHORT helpers
Thomas Parrott [Mon, 8 Jun 2020 12:24:08 +0000 (13:24 +0100)] 
macro: Adds UINT_TO_PTR and PTR_TO_USHORT helpers

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoMerge pull request #3434 from tomponline/tp-copying
Christian Brauner [Wed, 3 Jun 2020 10:54:32 +0000 (12:54 +0200)] 
Merge pull request #3434 from tomponline/tp-copying

.gitignore: Ignores COPYING file created by make

5 years ago.gitignore: Ignores COPYING file created by make 3434/head
Thomas Parrott [Wed, 3 Jun 2020 10:06:12 +0000 (11:06 +0100)] 
.gitignore: Ignores COPYING file created by make

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
5 years agoMerge pull request #3432 from smoser/fix/lxc-usernsexec-test-do-create-user
Christian Brauner [Tue, 2 Jun 2020 13:03:36 +0000 (15:03 +0200)] 
Merge pull request #3432 from smoser/fix/lxc-usernsexec-test-do-create-user

lxc-test-usernsexec: If user is root, then create and use non-root user.

5 years agolxc-test-usernsexec: If user is root, then create and use non-root user. 3432/head
Scott Moser [Mon, 1 Jun 2020 16:10:29 +0000 (12:10 -0400)] 
lxc-test-usernsexec: If user is root, then create and use non-root user.

Previously if the user was root, then the test would just skip
running (and exit 0).  The lxc test environment is run as root.
So, instead of never doing anything there, we create a user,
make sure it is in /etc/sub{ug}id and then execute the test as that
user.

If user is already non-root, then just execute the tests as before.

Signed-off-by: Scott Moser <smoser@brickies.net>
5 years agoMerge pull request #3428 from smoser/test/add-usernsexec-test
Stéphane Graber [Fri, 29 May 2020 20:42:04 +0000 (16:42 -0400)] 
Merge pull request #3428 from smoser/test/add-usernsexec-test

Add test of lxc-usernsexec

5 years agoAdd test of lxc-usernsexec 3428/head
Scott Moser [Fri, 29 May 2020 14:31:21 +0000 (10:31 -0400)] 
Add test of lxc-usernsexec

The test executes lxc-usernsexec to create some files and chmod them.
Then makes assertions on the uid and gid of those files from outside.

Signed-off-by: Scott Moser <smoser@brickies.net>
5 years agoMerge pull request #3424 from brauner/2020-05-25/fixes
Stéphane Graber [Mon, 25 May 2020 18:03:32 +0000 (14:03 -0400)] 
Merge pull request #3424 from brauner/2020-05-25/fixes

api_extensions: add "pidfd"

5 years agoapi_extensions: add "pidfd" 3424/head
Christian Brauner [Mon, 25 May 2020 17:49:10 +0000 (19:49 +0200)] 
api_extensions: add "pidfd"

Somehow it's documented but wasn't ever added.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotravis: Restrict coverity to gcc on bionic on amd64
Stéphane Graber [Fri, 22 May 2020 17:28:17 +0000 (13:28 -0400)] 
travis: Restrict coverity to gcc on bionic on amd64

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
5 years agoMerge pull request #3422 from brauner/2020-05-20/usernsexec_fixes
Stéphane Graber [Wed, 20 May 2020 12:54:42 +0000 (08:54 -0400)] 
Merge pull request #3422 from brauner/2020-05-20/usernsexec_fixes

lxc-usernsexec: improvements

5 years agolxc-usernsexec: don't fail on setgroups() 3422/head
Christian Brauner [Wed, 20 May 2020 10:14:21 +0000 (12:14 +0200)] 
lxc-usernsexec: don't fail on setgroups()

We can fail to setgroups() when "deny" has been set which we need to set when
we are a fully unprivileged user.

Closes: 3420.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxc-usernsexec: dumb down from error to warning message
Christian Brauner [Wed, 20 May 2020 10:10:54 +0000 (12:10 +0200)] 
lxc-usernsexec: dumb down from error to warning message

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3419 from brauner/2020-05-19/network_phys_fixes
Christian Brauner [Tue, 19 May 2020 08:33:55 +0000 (10:33 +0200)] 
Merge pull request #3419 from brauner/2020-05-19/network_phys_fixes

network: use __instantiate_ns_common() in instantiate_ns_phys() too

5 years agonetwork: use __instantiate_ns_common() in instantiate_ns_phys() too 3419/head
Christian Brauner [Tue, 19 May 2020 07:09:24 +0000 (09:09 +0200)] 
network: use __instantiate_ns_common() in instantiate_ns_phys() too

Fixes: https://lists.linuxcontainers.org/pipermail/lxc-users/2020-May/015245.html
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3418 from brauner/2020-05-18/android_fixes
Stéphane Graber [Mon, 18 May 2020 18:19:10 +0000 (14:19 -0400)] 
Merge pull request #3418 from brauner/2020-05-18/android_fixes

bionic: s/lxc_raw_execveat()/execveat()/g

5 years agobionic: s/lxc_raw_execveat()/execveat()/g 3418/head
Christian Brauner [Mon, 18 May 2020 18:02:37 +0000 (20:02 +0200)] 
bionic: s/lxc_raw_execveat()/execveat()/g

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3417 from brauner/2020-05-15/fixes
Stéphane Graber [Mon, 18 May 2020 16:41:21 +0000 (12:41 -0400)] 
Merge pull request #3417 from brauner/2020-05-15/fixes

network: fix {mac,ip,v}lan device creation

5 years agonetwork: fix {mac,ip,v}lan device creation 3417/head
Christian Brauner [Mon, 18 May 2020 15:11:26 +0000 (17:11 +0200)] 
network: fix {mac,ip,v}lan device creation

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3415 from brauner/2020-05-15/fixes
Stéphane Graber [Mon, 18 May 2020 01:35:35 +0000 (21:35 -0400)] 
Merge pull request #3415 from brauner/2020-05-15/fixes

network: restore old behavior

5 years agonetwork: restore old behavior 3415/head
Christian Brauner [Fri, 15 May 2020 19:14:15 +0000 (21:14 +0200)] 
network: restore old behavior

I introduced a regression: when users didn't specify a specific name via
lxc.net.<idx>.name then the device would retain the random name it received
when we created it. Before we would use the "eth%d" syntax to get the kernel to
assign a fixed name. Restore that behavior.

Closes: #3407.
Fixes: 8bf64b77ac8a ("network: rework network device creation")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3412 from brauner/2020-05-15/clone3
Serge Hallyn [Fri, 15 May 2020 19:01:35 +0000 (14:01 -0500)] 
Merge pull request #3412 from brauner/2020-05-15/clone3

clone3: add infrastructure and switch container creation to it

5 years agoMerge pull request #3414 from Blub/get-cgroup-path-compat
Christian Brauner [Fri, 15 May 2020 17:14:11 +0000 (19:14 +0200)] 
Merge pull request #3414 from Blub/get-cgroup-path-compat

improve LXC_CMD_GET_CGROUP compatibility

5 years agoimprove LXC_CMD_GET_CGROUP compatibility 3414/head
Wolfgang Bumiller [Fri, 15 May 2020 14:33:34 +0000 (16:33 +0200)] 
improve LXC_CMD_GET_CGROUP compatibility

When a newer lxc library communicates with an older one
(such as running an lxc 4.0 lxc-freeze on a longer running
container which was started while lxc was still at version
3), the LXC_CMD_GET_LIMITING_CGROUP command is not
available, causing the remote to just close the socket.
Catch this and try the previous command instead.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agocgroups: be less alarming when creating cgroups 3412/head
Christian Brauner [Fri, 15 May 2020 14:05:27 +0000 (16:05 +0200)] 
cgroups: be less alarming when creating cgroups

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoprocess_utils: make lxc use clone3() whenever possible
Christian Brauner [Fri, 15 May 2020 12:13:07 +0000 (14:13 +0200)] 
process_utils: make lxc use clone3() whenever possible

No more weird api quirks between architectures and cool new features.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3413 from Blub/dont-busy-loop-on-freeze
Christian Brauner [Fri, 15 May 2020 13:59:50 +0000 (15:59 +0200)] 
Merge pull request #3413 from Blub/dont-busy-loop-on-freeze

Don't busy loop on freeze with cgroupv2

5 years agocgfsng: use EPOLLPRI when polling cgroup.events 3413/head
Wolfgang Bumiller [Fri, 15 May 2020 13:07:35 +0000 (15:07 +0200)] 
cgfsng: use EPOLLPRI when polling cgroup.events

EPOLLIN will always be true and therefore end up
busy-looping

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agocgfsng: deduplicate freeze code
Wolfgang Bumiller [Fri, 15 May 2020 13:07:07 +0000 (15:07 +0200)] 
cgfsng: deduplicate freeze code

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agomainloop: add lxc_mainloop_add_handler_events
Wolfgang Bumiller [Fri, 15 May 2020 13:06:38 +0000 (15:06 +0200)] 
mainloop: add lxc_mainloop_add_handler_events

in order to be able to listen for EPOLLPRI

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoprocess_utils: add clone3() support
Christian Brauner [Fri, 15 May 2020 11:42:56 +0000 (13:42 +0200)] 
process_utils: add clone3() support

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoprocess_utils: introduce new process_utils.{c,h}
Christian Brauner [Fri, 15 May 2020 10:32:28 +0000 (12:32 +0200)] 
process_utils: introduce new process_utils.{c,h}

This will be the central place for all process management helpers. This also
removes raw_syscalls.{c,h}.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agosyscall_numbers: add clone3()
Christian Brauner [Fri, 15 May 2020 09:48:25 +0000 (11:48 +0200)] 
syscall_numbers: add clone3()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agosyscall_numbers: handle ia64 syscall numbers correctly
Christian Brauner [Fri, 15 May 2020 09:44:46 +0000 (11:44 +0200)] 
syscall_numbers: handle ia64 syscall numbers correctly

They are offset by 1024.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3411 from brauner/master
Stéphane Graber [Thu, 14 May 2020 19:19:45 +0000 (15:19 -0400)] 
Merge pull request #3411 from brauner/master

console: only create detached mount when a console is requested

5 years agoconsole: only create detached mount when a console is requested 3411/head
Christian Brauner [Thu, 14 May 2020 13:52:39 +0000 (15:52 +0200)] 
console: only create detached mount when a console is requested

otherwise weird things might happen.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3410 from brauner/2020-05-13/fixes
Stéphane Graber [Wed, 13 May 2020 19:23:45 +0000 (15:23 -0400)] 
Merge pull request #3410 from brauner/2020-05-13/fixes

reboot fixes

5 years agolog: cleanup syslog handling 3410/head
Christian Brauner [Wed, 13 May 2020 12:35:54 +0000 (14:35 +0200)] 
log: cleanup syslog handling

Disable and enable syslog around lxc_check_inherited().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: cleanup file descriptor inheritance
Christian Brauner [Wed, 13 May 2020 11:21:41 +0000 (13:21 +0200)] 
start: cleanup file descriptor inheritance

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: fix container reboot
Christian Brauner [Wed, 13 May 2020 10:59:59 +0000 (12:59 +0200)] 
start: fix container reboot

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxccontainer: use close_prot_errno_disarm() on state_socket_pair
Christian Brauner [Wed, 13 May 2020 10:39:28 +0000 (12:39 +0200)] 
lxccontainer: use close_prot_errno_disarm() on state_socket_pair

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agostart: remove unused lxc_zero_handler()
Christian Brauner [Wed, 13 May 2020 10:32:38 +0000 (12:32 +0200)] 
start: remove unused lxc_zero_handler()

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agolxccontainer: small cleanup to lxc_check_inherited() calls
Christian Brauner [Wed, 13 May 2020 10:25:25 +0000 (12:25 +0200)] 
lxccontainer: small cleanup to lxc_check_inherited() calls

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3408 from brauner/2020-05-11/fixes
Stéphane Graber [Tue, 12 May 2020 14:32:00 +0000 (10:32 -0400)] 
Merge pull request #3408 from brauner/2020-05-11/fixes

network: fix key ordering independence

5 years agoconfile: fix order independence of network keys 3408/head
Christian Brauner [Mon, 11 May 2020 20:16:59 +0000 (22:16 +0200)] 
confile: fix order independence of network keys

We need to make sure we don't overwrite values when they have already been set.

Closes: #3405.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agotools/lxc-ls: shut up lgtm more
Christian Brauner [Mon, 11 May 2020 07:16:33 +0000 (09:16 +0200)] 
tools/lxc-ls: shut up lgtm more

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
5 years agoMerge pull request #3403 from brauner/2020-05-07/fixes
Stéphane Graber [Thu, 7 May 2020 14:11:42 +0000 (10:11 -0400)] 
Merge pull request #3403 from brauner/2020-05-07/fixes

fixes