Azure / Azure/azure-container-networking

Fix logging response from NMAgent in syncHostNCVersion function

Open
#3,746 1 comment 1 reaction 1 assignee Assigned to @Copilot View on GitHub
cns stale
Dominant language
Go
Stars
434
Forks
276
Avg merge
5d 20h
Merged PRs (30d)
33

Description

In the syncHostNCVersion, if the number of updated NCs in the response from NMAgent does not match the expected number of updated NCs in CNS state, the function will log at the end:

```go
if len(outdatedNCs) > 0 {
return len(programmedNCs), errors.Errorf("unabled to update some NCs: %v, missing or bad response from NMA", outdatedNCs)
}
```

This is not a useful message because we don't know if the outdated NCs are programmed to some older version or if the NCs are completely missing from the response from NMAgent. This log line should be updated to separately print the missing NCs in the response and the outdated NCs in the response (including the expected and actual versions of the outdated NCs).

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.