fix: suppress warning message on a stopped container in nerdctl conta…#4967
Open
haytok wants to merge 1 commit into
Open
fix: suppress warning message on a stopped container in nerdctl conta…#4967haytok wants to merge 1 commit into
haytok wants to merge 1 commit into
Conversation
…iner inspect Currently, when running `nerdctl container inspect` on a stopped container, the following warning message is shown: ```bash > sudo nerdctl ps -a --filter=name=nginx CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4ce4cb9b1ed1 docker.io/library/nginx:latest "/docker-entrypoint.…" 14 hours ago Exited (0) 8 seconds ago nginx > sudo nerdctl container inspect nginx WARN[0000] failed to inspect NetNS error="failed to Statfs \"/proc/1548927/ns/net\": no such file or directory" id=4ce4cb9b1ed12f65b02e0f4af8a753d0e9ad1d42d5b77dac206c396021d90ab0 ... ``` This warning occurs because `/proc/<PID>/ns/net` is referenced using a stale PID, but the process for a stopped container has already been released. `/proc/<PID>/ns/net` should not be referenced when the container is stopped. Therefore, this commit suppresses the warning message above when running `nerdctl container inspect` on a stopped container. Signed-off-by: Hayato Kiwata <dev@haytok.jp>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…iner inspect
Currently, when running
nerdctl container inspecton a stopped container, the following warning message is shown:This warning occurs because
/proc/<PID>/ns/netis referenced using a stale PID, but the process for a stopped container has already been released./proc/<PID>/ns/netshould not be referenced when the container is stopped.Therefore, this commit suppresses the warning message above when running
nerdctl container inspecton a stopped container.