azure-container-networking icon indicating copy to clipboard operation
azure-container-networking copied to clipboard

fix: delete cni statefile when unable to be parsed

Open QxBytes opened this issue 7 months ago • 3 comments

Reason for Change:

Sometimes in certain scenarios (usually windows), if there is a crash of the OS, null bytes may be written to the state and log file. When the CNI tries to restore the state, it is unable to read the statefile and fails. All subsequent retries will fail as the state is irrecoverable. This PR changes this behavior to delete the entire cni statefile if there is a syntax error (ex: if there are a bunch of null bytes in the file), as manual intervention would be needed to recover anyway. The null statefile issue only seems to appear on the pipelines on windows nodes.

Issue Fixed:

See above

Requirements:

Notes: This issue appears sporadically

QxBytes avatar Apr 01 '25 22:04 QxBytes