Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman network create/rm: please ignore ENOENT #10926

Closed
edsantiago opened this issue Jul 13, 2021 · 9 comments · Fixed by #11629
Closed

podman network create/rm: please ignore ENOENT #10926

edsantiago opened this issue Jul 13, 2021 · 9 comments · Fixed by #11629
Assignees
Labels
flakes Flakes from Continuous Integration In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@edsantiago
Copy link
Member

There's a race condition between the time podman reads its CNI directory and the time it tries to read conflist files. Trivial reproducer (requires two shells):

! window 1
$ while :;do bin/podman network create aaa;bin/podman network rm -f aaa;done

! window 2
$ while :;do bin/podman network create bbb;bin/podman network rm -f bbb;done

Within less than ten seconds, one or the other will spit out:

ERRO[0000] Error loading CNI config list file /home/esm/.config/cni/net.d/xxx.conflist: error reading /home/esm/.config/cni/net.d/xxx.conflist: open /home/esm/.config/cni/net.d/xxx.conflist: no such file or directory

...where xxx is the name of the other window (e.g. you will see "bbb" in the aaa window and vice-versa).

(Note: even though it says ERRO, it's not an error and does not cause a nonzero exit status).

This is really annoying to me when looking at integration-test logs, because they all show up in bright scary orange that makes me think there's an error (and, in some cases, hides real errors because of the cry-wolf thing).

To normal-people users, this is probably kind of alarming, and would presumably cause them to waste an indeterminate amount of time looking into it.

Easy/obvious solution is to just ignore ENOENT, ¿que no?

@edsantiago edsantiago added flakes Flakes from Continuous Integration kind/bug Categorizes issue or PR as related to a bug. labels Jul 13, 2021
@edsantiago
Copy link
Member Author

Oops, forgot to xref #9041

@Luap99
Copy link
Member

Luap99 commented Jul 14, 2021

The only place where this error is shown is in ocicni and I already fixed it to make it ignore enoent, at least I thought it was fixed with cri-o/ocicni#85.
https://github.com/cri-o/ocicni/blob/5ce5cee5666d097f0a18341868b87eb8c016480d/pkg/ocicni/ocicni.go#L290-L296
Maybe !os.IsNotExist(err) does not work correctly in this case.

@edsantiago
Copy link
Member Author

@Luap99 maybe my setup doesn't have that vendored in? Can you reproduce on your system?

@Luap99
Copy link
Member

Luap99 commented Jul 14, 2021

It is vendored in. I just checked the code. CNI does not return a warped error. It uses fmt.Errorf("error reading %s: %s", filename, err). Therefore we cannot check the root cause of this error correctly. I think we have to use string comparison to catch this.

@rhatdan
Copy link
Member

rhatdan commented Jul 14, 2021

Yes this output looks like it is a logrus.Error.

@Luap99
Copy link
Member

Luap99 commented Jul 21, 2021

Upstream PR containernetworking/cni#850 to fix this is merged. When they release CNI v1.0.0 we can vendor this in (hopefully soon).

@edsantiago
Copy link
Member Author

Just a quick comment to reset the nagbot. This is still happening often:

Podman network [It] podman network prune

@Luap99
Copy link
Member

Luap99 commented Sep 9, 2021

CNI version 1.0.0 is available, I can start updating when #11322 is merged.

@Luap99 Luap99 self-assigned this Sep 17, 2021
@Luap99 Luap99 added 4.0 In Progress This issue is actively being worked by the assignee, please do not work on this at this time. labels Sep 17, 2021
Luap99 added a commit to Luap99/libpod that referenced this issue Sep 22, 2021
Update CNI so we can match wrapped errors. This should silence ENOENT
warnings when trying to read the cni conflist files.

Fixes containers#10926

Because CNI v1.0.0 contains breaking changes we have to change some
import paths. Also we cannot update the CNI version used for the
conflist files created by `podman network create` because this would
require at least containernetwork-plugins v1.0.1 and a updated dnsname
plugin. Because this will take a while until it lands in most distros
we should not use this version. So keep using v0.4.0 for now.

The update from checkpoint-restore/checkpointctl is also required to
make sure it no longer uses CNI to read the network status.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flakes Flakes from Continuous Integration In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants