Azure / Azure/azure-container-networking

CNS Possibly Not Handling Error Correctly and Possibly Not Releasing IP Address

Open
#3,557 4 comments 1 reaction 3 assignees Claimed by @camrynl View on GitHub
bug cni cns exempt-stale
Dominant language
Go
Stars
434
Forks
276
Avg merge
5d 20h
Merged PRs (30d)
33

Description

I have not observed this however while reading the code, I noticed this as a possible condition that may not release the ip address.

https://github.com/Azure/azure-container-networking/blob/a2a2ab89b94e68245f29118ce9c450517b8cee01/cns/fsnotify/fsnotify.go#L60

If os.Open(..) returns an error, we log however continue. io.ReadAll(...) returns an invalid argument error and continues (but logs error). The .Close function handles the nil condition and continues.

podInterfaceID := string(data) is just an empty string and assuming what ever was supposed to happen on line https://github.com/Azure/azure-container-networking/blob/a2a2ab89b94e68245f29118ce9c450517b8cee01/cns/fsnotify/fsnotify.go#L73 is not happening?

Note: I didn't do a full analysis however the function looks suspect.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.