diff options
author | Thomas Haller <thaller@redhat.com> | 2021-02-15 20:52:55 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-02-15 21:18:06 +0100 |
commit | c7fa8d0a161472b4def1d162315c23dfc69e3ca5 (patch) | |
tree | 61fa37f00a21ccfa587f6935d38d1404f53d41ea | |
parent | f6c07c39e470ffa71c5afe952747c5ecd33f609d (diff) | |
download | NetworkManager-c7fa8d0a161472b4def1d162315c23dfc69e3ca5.tar.gz |
platform: downgrade severity of message for failure to create NMPNetns
Under restricted permissions (like inside a podman container) opening
"/proc/self/ns/net" fails with Permission denied. Consequently we cannot
create our bottom NMPNetns instance. That is mostly fine, however we
would log an error message with severity <error>.
Note that test "src/core/platform/tests/test-platform-general" asserts
that no <warn> and <error> messages get logged. Hence, the test will
fail.
That is undesirable. Downgrade the message to <debug> so that the test
passes. Also, it's not clear that this error message is useful here.
Being unable to open a netns fd is fine and not necessarily an error
condition.
(cherry picked from commit 0213300dcee438a0b48a3d3a6da3112286ad43d1)
-rw-r--r-- | shared/nm-platform/nmp-netns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/nm-platform/nmp-netns.c b/shared/nm-platform/nmp-netns.c index 0828f4abd6..f97339a756 100644 --- a/shared/nm-platform/nmp-netns.c +++ b/shared/nm-platform/nmp-netns.c @@ -171,7 +171,7 @@ _netns_stack_get_impl(void) netns = _netns_new(&error); if (!netns) { - _LOGE(NULL, "failed to create initial netns: %s", error->message); + _LOGD(NULL, "failed to create initial netns: %s", error->message); return s; } |