Skip to content

CNS Possibly Not Handling Error Correctly and Possibly Not Releasing IP AddressΒ #3557

@MikeZappa87

Description

@MikeZappa87

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

file, err := os.Open(filepath)

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

if err := w.releaseIP(ctx, podInterfaceID, containerID); err != nil {
is not happening?

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

Metadata

Metadata

Labels

bugcniRelated to CNI.cnsRelated to CNS.exempt-staleKeep this fresh

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions