[lxc/lxc] a53589: lxc/lxccontainer: stop printing misleading errors ...

1 view
Skip to first unread message

Stéphane Graber

unread,
Jul 28, 2025, 2:02:17 PMJul 28
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/main
Home: https://github.com/lxc/lxc
Commit: a53589e0636b42a2816375c9a2c1c4be09100297
https://github.com/lxc/lxc/commit/a53589e0636b42a2816375c9a2c1c4be09100297
Author: Alexander Mikhalitsyn <aleksandr....@canonical.com>
Date: 2025-07-28 (Mon, 28 Jul 2025)

Changed paths:
M src/lxc/lxccontainer.c
M src/lxc/utils.c
M src/lxc/utils.h

Log Message:
-----------
lxc/lxccontainer: stop printing misleading errors in enter_net_ns()

In enter_net_ns() we try to enter network namespace at first, before
entering a user namespace to support inherited netns case properly.
It is expected to get EPERM for unprivileged container with non-shared
network namespace at first try. Let's take this into account
and stop misleading users with these error messages.

Link: https://discuss.linuxcontainers.org/t/lxc-ls-fancy-command-shows-operation-not-permitted/24080
Fixes: 3011e79f92ef ("lxccontainer: fix enter_net_ns helper to work when netns is inherited")
Fixes: #4560
Signed-off-by: Alexander Mikhalitsyn <aleksandr....@canonical.com>


Commit: ca8f4a9a544360f294a1062131c8f3d65b6d1ff9
https://github.com/lxc/lxc/commit/ca8f4a9a544360f294a1062131c8f3d65b6d1ff9
Author: Stéphane Graber <stgr...@stgraber.org>
Date: 2025-07-28 (Mon, 28 Jul 2025)

Changed paths:
M src/lxc/lxccontainer.c
M src/lxc/utils.c
M src/lxc/utils.h

Log Message:
-----------
Merge pull request #4566 from mihalicyn/enter_net_ns_errors_fix

lxc/lxccontainer: stop printing misleading errors in enter_net_ns()


Compare: https://github.com/lxc/lxc/compare/e2434a200799...ca8f4a9a5443

To unsubscribe from these emails, change your notification settings at https://github.com/lxc/lxc/settings/notifications
Reply all
Reply to author
Forward
0 new messages