You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running gomplate in a windows docker container in an Win2016 EC2 instance (gomplate_windows-amd64-slim.exe)
In such context, about one in 5 or 10 calls to EC2 service takes 1s or +. In such case, gomplate doesn't wait enough. See last output below.
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
us-east-1
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
us-east-1
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
us-east-1
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
unknown
Why it sometimes takes 1s+ is probably due to running inside a container and having to add this rule (windows docker containers do not have access to Amazon service by default)
[string] $gatewayIpAddress = (Get-NetIPConfiguration -All).IPv4DefaultGateway.NextHop
route add 169.254.169.254 $gatewayIpAddress
The text was updated successfully, but these errors were encountered:
@chrix-3E8 I think the right approach is to support an environment variable (AWS_TIMEOUT or something), to allow the default timeout of 500ms to be overridden. I'll see about getting that in a release soon.
Running gomplate in a windows docker container in an Win2016 EC2 instance (gomplate_windows-amd64-slim.exe)
In such context, about one in 5 or 10 calls to EC2 service takes 1s or +. In such case, gomplate doesn't wait enough. See last output below.
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
us-east-1
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
us-east-1
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
us-east-1
PS C:> echo '{{aws.EC2Region "unknown" -}}' | ./gomplate
unknown
Should it wait more in the line below?
https://github.com/hairyhenderson/gomplate/blob/master/aws/ec2info.go#L45
The equivalent call does work every time - but it does occasionally take 1s+
(Invoke-WebRequest 'http://169.254.169.254/latest/dynamic/instance-identity/document').Content
Why it sometimes takes 1s+ is probably due to running inside a container and having to add this rule (windows docker containers do not have access to Amazon service by default)
[string] $gatewayIpAddress = (Get-NetIPConfiguration -All).IPv4DefaultGateway.NextHop
route add 169.254.169.254 $gatewayIpAddress
The text was updated successfully, but these errors were encountered: