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

aws/ec2metadata: Fix EC2 Metadata client panic with debug logging #2461

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Feb 18, 2019

Fixes a panic that could occur witihin the EC2 Metadata client when both
AWS_EC2_METADATA_DISABLED env var is set and log level is
LogDebugWithHTTPBody. The SDK's client response body debug functionality
would panic because the Request.HTTPResponse value was not specified.

Updates the client debug loggers to check if the response is set before
attempting to log.

Fixes a panic that could occur witihin the EC2 Metadata client when both
`AWS_EC2_METADATA_DISABLED` env var is set and log level is
LogDebugWithHTTPBody. The SDK's client response body debug functionality
would panic because the Request.HTTPResponse value was not specified.

Updates the client debug loggers to check if the response is set before
attempting to log.
@jasdel jasdel self-assigned this Feb 18, 2019
@jasdel jasdel merged commit ad1ac9d into aws:master Feb 26, 2019
@jasdel jasdel deleted the fixup/Ec2MetadataPanic branch February 26, 2019 21:11
@aws-sdk-go-automation aws-sdk-go-automation mentioned this pull request Feb 28, 2019
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Apr 9, 2019
Fixes a panic that could occur witihin the EC2 Metadata client when both
AWS_EC2_METADATA_DISABLED env var is set and log level is
LogDebugWithHTTPBody. The SDK's client response body debug functionality
would panic because the Request.HTTPResponse value was not specified.

Updates the client debug loggers to check if the response is set before
attempting to log.

V2 SDK port of: aws/aws-sdk-go#2461
jasdel added a commit to aws/aws-sdk-go-v2 that referenced this pull request Apr 10, 2019
Fixes a panic that could occur witihin the EC2 Metadata client when both
AWS_EC2_METADATA_DISABLED env var is set and log level is
LogDebugWithHTTPBody. The SDK's client response body debug functionality
would panic because the Request.HTTPResponse value was not specified.

Updates the client debug loggers to check if the response is set before
attempting to log.

V2 SDK port of: aws/aws-sdk-go#2461
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.

1 participant