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

Enhance cni deletion #1149

Open
nevermore-muyi opened this issue Dec 13, 2024 · 0 comments
Open

Enhance cni deletion #1149

nevermore-muyi opened this issue Dec 13, 2024 · 0 comments

Comments

@nevermore-muyi
Copy link

At https://github.com/containernetworking/cni/blob/main/libcni/api.go#L378, if cni has added network data into cni cache file path (default /var/lib/cni/results/xxx ), but the machine just restarted and the cni cache data may not saved because of disk synchronization.

So, if fdata is empty, may return nil is a more reasonable implementation?

fdata, err := os.ReadFile(fname) if err != nil { // Ignore read errors; the cached result may not exist on-disk return nil, nil } if fdata == "" { return nil, nil }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant