Skip to content

Conversation

@tyler-lloyd
Copy link
Contributor

Reason for Change:

On Windows, the path /var/run/azure-vnet does not exist so calling Mkdir('/var/run/azure-vnet/deleteIDs' will fail because the parent folder doesn't exist. Switch to MkdirAll so it creates any necessary parent folders.

Issue Fixed:

Requirements:

Notes:

On Windows, the path /var/run/azure-vnet does not exist
so calling `Mkdir('/var/run/azure-vnet/deleteIDs'` will fail
because the parent folder doesn't exist. Switch to MkdirAll
so it creates any necessary parent folders.
@tyler-lloyd tyler-lloyd requested a review from a team as a code owner December 6, 2023 13:39
@rbtr
Copy link
Collaborator

rbtr commented Dec 13, 2023

I think we want to leave this as MkDir so that we can error out if the volume mount is wrong/the path doesn't exist - this should be a terminal error to CNS. CNI on the host is writing to a well-known dir, and if CNS can't read from there then it can miss deletes and leak IPs. Creating the full path if it doesn't exist hides the config issue that CNI is writing to one dir and CNS is reading from another...

the goroutine leak that prompted this PR was fixed in #2427

@rbtr rbtr closed this Dec 13, 2023
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

Successfully merging this pull request may close these issues.

3 participants