Skip to content

Conversation

DP19
Copy link
Contributor

@DP19 DP19 commented Jul 21, 2020

Issue #, if available: 183

Description of changes:

Added AvailabilityZone field to NodeMetadata struct to be used in the webTemplate. Added tests and updated docs per this change.

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

@bwagner5 bwagner5 added the Type: Enhancement New feature or request label Jul 21, 2020
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM 👍

@bwagner5 bwagner5 merged commit 8557cf7 into aws:master Jul 21, 2020
@DP19
Copy link
Contributor Author

DP19 commented Jul 21, 2020

@bwagner5 - Thanks! I did update the e2e tests to include this new field and saw that it ended up being an empty string

2020/07/21 14:48:07 Startup Metadata Retrieved: {InstanceID:i-1234567890abcdef0 InstanceType:m4.large PublicHostname:ec2-12-34-56-89.compute-1.amazonaws.com PublicIP:12.34.56.89 LocalHostname:ip-87-65-43-21.ec2.internal LocalIP:87.65.43.21 AvailabilityZone:{}}

2020/07/21 14:48:21 Got interruption event from channel {InstanceID:i-1234567890abcdef0 InstanceType:m4.large PublicHostname:ec2-12-34-56-89.compute-1.amazonaws.com PublicIP:12.34.56.89 LocalHostname:ip-87-65-43-21.ec2.internal LocalIP:87.65.43.21 AvailabilityZone:{}} {EventID:spot-itn-b8eb1e0bd5080acb927a7f124aa20792d925f8c67e1bc57a084086ea2887bb40 Kind:SPOT_ITN Description:Spot ITN received. Instance will be interrupted at 2020-07-21T14:50:05Z

Test

Is this info just not included in the testing environment? I was able to curl this endpoint on my eks nodes and it did return the correct info, just want to double check this was a testing env issue and not something else!

@bwagner5
Copy link
Contributor

@DP19 The EC2 Metadata Test Proxy that is used for e2e tests does not expose the AZ, however there's a PR #209, that will probably be merged today, which moves to the Amazon EC2 Metadata Mock and it does include the placement/availability-zone path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants