Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error count granular #1651

Merged
merged 2 commits into from
Oct 3, 2021
Merged

Make error count granular #1651

merged 2 commits into from
Oct 3, 2021

Conversation

jayanthvn
Copy link
Contributor

@jayanthvn jayanthvn commented Oct 1, 2021

What type of PR is this?
Bug

Which issue does this PR fix:
Fixes #1636

What does this PR do / Why do we need it:
Currently we awsAPIErrInc("GetMetadata", err) in a common function which fetches from IMDS GetMetadataWithContext. We query for prefixes and secondary IPs but with secondary IP mode get prefixes will return 404 which is expected but the common functions logs the events as an error. Instead moving the logic to make the error count more granular. With this PR we will know the exact field in IMDS which is causing the error rather than just getMetaData which isnt sufficient for debugging.

If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:

Testing done on this change:

Yes

No errors incrementing.

Screen Shot 2021-10-01 at 3 27 35 PM

Automation added to e2e:

n/a

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
no

Does this change require updates to the CNI daemonset config files to work?:

no

Does this PR introduce any user-facing change?:

no


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jayanthvn jayanthvn added this to the v1.10 milestone Oct 1, 2021
pkg/awsutils/awsutils.go Outdated Show resolved Hide resolved
@jayanthvn jayanthvn merged commit dda97f2 into aws:master Oct 3, 2021
jayanthvn added a commit to jayanthvn/amazon-vpc-cni-k8s that referenced this pull request Oct 3, 2021
* Make error count granular

* minor nit
achevuru pushed a commit that referenced this pull request Oct 3, 2021
* Make error count granular

* minor nit
jayanthvn added a commit to jayanthvn/amazon-vpc-cni-k8s that referenced this pull request Oct 11, 2021
* Make error count granular

* minor nit
jayanthvn added a commit that referenced this pull request Oct 11, 2021
* Make error count granular (#1651)

* Make error count granular

* minor nit

* Update golang (#1665)

* Update golang

* Update go.mod

* Gomod fix
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.

InstanceMetadata awsApiErr elevated in cni 1.9
2 participants