-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
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 }
Metadata
Metadata
Assignees
Labels
No labels