[lxc-devel] [lxc/lxc] 6de35c: macro: abuse ENOMEDIUM as ENOCGROUP2

Stéphane Graber noreply at github.com
Tue Feb 2 23:30:44 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 6de35cd9590c72686271148f408a641ec5b5e6a6
      https://github.com/lxc/lxc/commit/6de35cd9590c72686271148f408a641ec5b5e6a6
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/macro.h

  Log Message:
  -----------
  macro: abuse ENOMEDIUM as ENOCGROUP2

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 2b5e0b8bd2f2d33383e81b9fc157d1855de90e23
      https://github.com/lxc/lxc/commit/2b5e0b8bd2f2d33383e81b9fc157d1855de90e23
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/file_utils.c
    M src/lxc/file_utils.h

  Log Message:
  -----------
  file_utils: add lxc_read_try_buf_at()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: b1356424886989139f83a63f0709007e5792d1f5
      https://github.com/lxc/lxc/commit/b1356424886989139f83a63f0709007e5792d1f5
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h

  Log Message:
  -----------
  cgroups: add cgroup_get()

This is a unified hierarchy only method which doesn't need to initialize a full
cgroup driver. Instead, it relies on the command socket to retrieve a cgroup2
file descriptor to the container's cgroup.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: a29cc280c7169ddf234ea620df8c3ba687945f61
      https://github.com/lxc/lxc/commit/a29cc280c7169ddf234ea620df8c3ba687945f61
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxccontainer: use cgroup_get()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 3baf0fc8b9c2eb6226d395bd4771eae83e91b053
      https://github.com/lxc/lxc/commit/3baf0fc8b9c2eb6226d395bd4771eae83e91b053
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  cgroups: reorder cgroup_get() arguments

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 983b1db09dd09be107ef1c9fa0968c01acbc2c3f
      https://github.com/lxc/lxc/commit/983b1db09dd09be107ef1c9fa0968c01acbc2c3f
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h

  Log Message:
  -----------
  cgroups: add croup_set()

This is a unified hierarchy only method which doesn't need to initialize a full
cgroup driver. Instead, it relies on the command socket to retrieve a cgroup2
file descriptor to the container's cgroup.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: efb4b3e80fe736cfd259750c8426b4ac8e8d8d5d
      https://github.com/lxc/lxc/commit/efb4b3e80fe736cfd259750c8426b4ac8e8d8d5d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxccontainer: use correct variable ordering

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 69edb51d0792329df14c0aaac0466409061b0c9b
      https://github.com/lxc/lxc/commit/69edb51d0792329df14c0aaac0466409061b0c9b
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxccontainer: use cgroup_set()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: be835470f3cc75c4d729dbb09bc7e83baf359896
      https://github.com/lxc/lxc/commit/be835470f3cc75c4d729dbb09bc7e83baf359896
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: move functions after methods

This makes it more obvious that they are separate.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 751a624fb52ca20233e94521f27c4e935742546a
      https://github.com/lxc/lxc/commit/751a624fb52ca20233e94521f27c4e935742546a
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: annotate cgroup_get()/cgroup_set()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 241670e7e97d820bd2e36b3c3a2382f6738a2dd6
      https://github.com/lxc/lxc/commit/241670e7e97d820bd2e36b3c3a2382f6738a2dd6
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/commands_utils.c
    M src/lxc/commands_utils.h

  Log Message:
  -----------
  commands_utils: add lcx_cmd_notify_state_listeners()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 419847a8aaa6383ea2859b666d3b22b361b76efd
      https://github.com/lxc/lxc/commit/419847a8aaa6383ea2859b666d3b22b361b76efd
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/freezer.c

  Log Message:
  -----------
  freezer: use lxc_cmd_notify_state_listeners()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: c8af3332bc70f6b8a0c733a4c89ee6d657cc8379
      https://github.com/lxc/lxc/commit/c8af3332bc70f6b8a0c733a4c89ee6d657cc8379
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h

  Log Message:
  -----------
  cgroups: add cgroup_freeze() and cgroup_unfreeze()

These are unified hierarchy only methods which don't need to initialize a full
cgroup driver. Instead, they rely on the command socket to retrieve a cgroup2
file descriptor to the container's cgroup.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 4639029c9f6e3929d0b06af37e97b81f9f5853f3
      https://github.com/lxc/lxc/commit/4639029c9f6e3929d0b06af37e97b81f9f5853f3
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/freezer.c
    M src/lxc/lxc.h

  Log Message:
  -----------
  freezer: make methods return bool

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 97d7b200d996900e91b9df40f5f3ef0d75d4f43d
      https://github.com/lxc/lxc/commit/97d7b200d996900e91b9df40f5f3ef0d75d4f43d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxccontainer: use cgroup_freeze() and cgroup_unfreeze()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 281c36454a3d00ec6ede254af44bef268108eea2
      https://github.com/lxc/lxc/commit/281c36454a3d00ec6ede254af44bef268108eea2
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: rewind() file before polling again

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: bfe2971ae41d2ed3694a7661e819251751b41064
      https://github.com/lxc/lxc/commit/bfe2971ae41d2ed3694a7661e819251751b41064
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  cgroups: remove unused conf argument

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: b57f9b131918c064b43cc371f3123492355b5c16
      https://github.com/lxc/lxc/commit/b57f9b131918c064b43cc371f3123492355b5c16
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: vet parameters

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 739af8478c105d8155f326946f741a24ee887059
      https://github.com/lxc/lxc/commit/739af8478c105d8155f326946f741a24ee887059
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  lxccontainer: use correct error checks

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 029d8e8801d489fd28a337aaebbffb385d86385a
      https://github.com/lxc/lxc/commit/029d8e8801d489fd28a337aaebbffb385d86385a
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: move down cgroup_attach()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 6407e1c244ea62d951a343a35d391ad181d0c7ac
      https://github.com/lxc/lxc/commit/6407e1c244ea62d951a343a35d391ad181d0c7ac
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: stricter argument vetting for cgroup_attach()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 6b55ce0ed389b8a2ea0adee662adb59ddfe4c98d
      https://github.com/lxc/lxc/commit/6b55ce0ed389b8a2ea0adee662adb59ddfe4c98d
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: return ENOCGROUP2 from cgroup_attach()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 29619d419bcfb8870ff73efcce591943aaf948cd
      https://github.com/lxc/lxc/commit/29619d419bcfb8870ff73efcce591943aaf948cd
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/attach.c

  Log Message:
  -----------
  attach: check for ENOCGROUP2 explicitly

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 5ef7547f3d50ae4c83339e8f452c01a825b2c315
      https://github.com/lxc/lxc/commit/5ef7547f3d50ae4c83339e8f452c01a825b2c315
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h
    M src/lxc/freezer.c
    M src/lxc/lxc.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  cgroups: switch back to returning ints

Whick makes for easier error checking and fallback code.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: c5bac50665e0b23a6aa3fc6e52ad8ab3abfc97e6
      https://github.com/lxc/lxc/commit/c5bac50665e0b23a6aa3fc6e52ad8ab3abfc97e6
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/attach.c
    M src/lxc/lxcseccomp.h
    M src/lxc/seccomp.c

  Log Message:
  -----------
  attach: explicitly close seccomp notifier fd

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 44322ead3981b47d7c8e4c578f0e8fd5790b0414
      https://github.com/lxc/lxc/commit/44322ead3981b47d7c8e4c578f0e8fd5790b0414
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/tests/cgpath.c

  Log Message:
  -----------
  cgpath: add logging

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 6f7f2966b10602227a325ff2e8f01a111afc19aa
      https://github.com/lxc/lxc/commit/6f7f2966b10602227a325ff2e8f01a111afc19aa
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  commands: add missing lxc_cmd_get_limiting_cgroup2_fd() implementation

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: ae4fcc7b11bf1f616752bc2c0a02e84a54a8ea93
      https://github.com/lxc/lxc/commit/ae4fcc7b11bf1f616752bc2c0a02e84a54a8ea93
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c

  Log Message:
  -----------
  cgroups: use lxc_cmd_get_limiting_cgroup2_fd()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: c9c814f4d445812d2338b084d4ee149b49114878
      https://github.com/lxc/lxc/commit/c9c814f4d445812d2338b084d4ee149b49114878
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h

  Log Message:
  -----------
  cgroups: export __cgroup_unfreeze() for use in commands

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 9d47970b9be9b1ebd425fde8c8bb949b1ba8965c
      https://github.com/lxc/lxc/commit/9d47970b9be9b1ebd425fde8c8bb949b1ba8965c
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/commands.c

  Log Message:
  -----------
  commands: use __cgroup_unfreeze() directly

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: ea299bfc9860b4e2f12c5d47da562412e1b840de
      https://github.com/lxc/lxc/commit/ea299bfc9860b4e2f12c5d47da562412e1b840de
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/freezer.c

  Log Message:
  -----------
  freezer: remove lxc_cmd_freeze() and lxc_cmd_unfreeze() calls

We're now handling them better.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: a4f24357189fd74965d516c8373f1ca75a405668
      https://github.com/lxc/lxc/commit/a4f24357189fd74965d516c8373f1ca75a405668
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/tests/Makefile.am
    M src/tests/device_add_remove.c

  Log Message:
  -----------
  test: add logging to device_add_remove

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 7d013cccf9784d69ea3a40b75f2c95979e517e3a
      https://github.com/lxc/lxc/commit/7d013cccf9784d69ea3a40b75f2c95979e517e3a
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/tests/cgpath.c

  Log Message:
  -----------
  tests: support pure unified cgroup layouts in cgpath test

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: b7aeda9691f782e1d13b6ab57bd6c27d5dc4cc87
      https://github.com/lxc/lxc/commit/b7aeda9691f782e1d13b6ab57bd6c27d5dc4cc87
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  cgroups: improve parameter vetting

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 07f89a4faf1ce60727015e8e68ac26f4647f768b
      https://github.com/lxc/lxc/commit/07f89a4faf1ce60727015e8e68ac26f4647f768b
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M src/lxc/attach.c
    M src/lxc/cgroups/cgfsng.c
    M src/lxc/cgroups/cgroup.h
    M src/lxc/commands.c
    M src/lxc/commands_utils.c
    M src/lxc/commands_utils.h
    M src/lxc/file_utils.c
    M src/lxc/file_utils.h
    M src/lxc/freezer.c
    M src/lxc/lxccontainer.c
    M src/lxc/lxcseccomp.h
    M src/lxc/macro.h
    M src/lxc/seccomp.c
    M src/tests/Makefile.am
    M src/tests/cgpath.c
    M src/tests/device_add_remove.c

  Log Message:
  -----------
  Merge pull request #3647 from brauner/2021-02-02/fixes

cgroup2: only rely on command socket when getting cgroup values


Compare: https://github.com/lxc/lxc/compare/b22ae8438939...07f89a4faf1c


More information about the lxc-devel mailing list