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

Improve error log when instance reigstration fails due to bad attributes #2999

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

angelcar
Copy link
Contributor

Summary

Addresses #2981

Implementation details

The validation of the attributes is done in the back-end. When validation fails, the back end doesn't return an actual error, so the agent actually compares attributes in the request vs attributes in the response, and if any are missing we deduct there was a problem, how ever there's no information as to why.

However, the information about attribute validation is documented publicly, so we add that information in the log for the customer convenience.

Testing

UTs suffice

Description for the changelog

  • Improvement of log message displayed when container instance registartion fails due to attribute validation errors.

Licensing

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

@yinyic
Copy link
Contributor

yinyic commented Aug 25, 2021

agent actually compares attributes in the request vs attributes in the response, and if any are missing we deduct there was a problem

Is it possible to include the attributes that fail to register in the error message? I think that'll give customer a better clue.

@angelcar
Copy link
Contributor Author

angelcar commented Aug 25, 2021

Is it possible to include the attributes that fail to register in the error message? I think that'll give customer a better clue.

Good idea @yinyic . Will do

Actually @yinyic, that log message already exists here:

seelog.Errorf("Error registering attributes: %v", msg)

@angelcar angelcar merged commit cb051ab into aws:dev Aug 25, 2021
@angelcar angelcar deleted the fix-attribute-error-log branch August 27, 2021 03:25
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.

4 participants