Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Make cloud provider metadata log more robust #1620

Merged
merged 1 commit into from
Mar 5, 2021
Merged

Make cloud provider metadata log more robust #1620

merged 1 commit into from
Mar 5, 2021

Conversation

dloucasfx
Copy link
Contributor

I set the first error to info and the rest to Error.
If we made it through the curl, this means that we are on AWS, so the anything error later on is an accurate error

cc: @jrcamp @keitwb
Signed-off-by: Dani Louca [email protected]

Copy link
Contributor

@jrcamp jrcamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change Azure as well for consistency?

pkg/core/hostid/gcp.go Outdated Show resolved Hide resolved
pkg/core/hostid/aws.go Outdated Show resolved Hide resolved
@dloucasfx
Copy link
Contributor Author

updated to remove error from the message and make the integration tests happy

@keitwb
Copy link
Contributor

keitwb commented Mar 5, 2021

That didn't seem to make them happy yet.

@dloucasfx
Copy link
Contributor Author

@keitwb
this is strange, the assertion looks for level=error

match = re.search(r"(?<=level=)\w+", line)

And the only error log I have changed is after the initial connection succeeding https://github.com/signalfx/signalfx-agent/pull/1620/files#diff-5c32148c814c31d5bd8804f4de667e16e11040ec1e9190a18373e301a1ab772aR33
so looks like for whatever reasons, the aws metedata server connection is not throwing an error.
Is the CI on AWS?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants