Skip to content
New issue

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

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

Already on GitHub? # 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 }

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

No branches or pull requests

1 participant