hashicorp / terraform-aws-consul

A Terraform Module for how to run Consul on AWS using Terraform and Packer
Apache License 2.0
399 stars 482 forks source link

Update agent configuration #208

Closed anouarchattouna closed 3 years ago

anouarchattouna commented 3 years ago
hashicorp-cla commented 3 years ago

CLA assistant check
All committers have signed the CLA.

brikis98 commented 3 years ago

Re-running tests...

brikis98 commented 3 years ago

Hm, a bunch of tests just failed with errors like this:

TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: Error: Error authorizing security group rule type ingress: InvalidGroup.NotFound: The security group 'sg-0b786e117be04930a' does not exist
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168:   status code: 400, request id: 4ff66e90-dc95-4c0c-bc1c-2b66c85d48db
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: Error: Error authorizing security group rule type ingress: InvalidGroup.NotFound: The security group 'sg-0b786e117be04930a' does not exist
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168:   status code: 400, request id: de07b152-c1d5-4fee-9073-5ee3f93540eb
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 

This is something new that just appeared and isn't related to this PR. I just saw it in https://github.com/hashicorp/terraform-aws-consul/issues/209 the first time, though it only happened on one test, whereas here, it happened on 5, so it suggests it's an intermittent / transient issue.

@anouarchattouna Apologies for the yak shave, but would you mind digging into this issue a bit? See if you can repro by manually running apply? Perhaps experiment with different AWS provider versions in case it's a new bug they just introduced?

brikis98 commented 3 years ago

There was an AWS outage yesterday which might explain the intermittent test failures we're seeing. Re-running tests now to see if it helps.

brikis98 commented 3 years ago

Nope, we're still getting the same type of test failures 😞

TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: Error: Error authorizing security group rule type ingress: InvalidGroup.NotFound: The security group 'sg-0b786e117be04930a' does not exist
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168:   status code: 400, request id: 4ff66e90-dc95-4c0c-bc1c-2b66c85d48db
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2021-01-26T12:36:44Z command.go:168: Error: Error authorizing security group rule type ingress: InvalidGroup.NotFound: The security group 'sg-0b786e117be04930a' does not exist

So this will need more investigation.

brikis98 commented 3 years ago

OK, tests are now running! Not sure what the issue was last week. Perhaps some CircleCi bug?

brikis98 commented 3 years ago

Tests passed! Merging now.

brikis98 commented 3 years ago

https://github.com/hashicorp/terraform-aws-consul/releases/tag/v0.8.5

brikis98 commented 3 years ago

I wonder if this fixed #209?

brikis98 commented 3 years ago

(I know the tests passed, but it was an intermittent test failure, so perhaps we just got lucky? I guess we'll see if the merge to master passes tests too).

brikis98 commented 3 years ago

Hm, tests failed on merge to master, but with a different error:

TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:03Z test_structure.go:23: The 'SKIP_validate' environment variable is not set, so executing stage 'validate'.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:03Z save_test_data.go:195: Loading test data from /tmp/TestConsulInstallFromURLWithUbuntu18Ami269819328/project/.test-data/AwsRegion.json
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:03Z save_test_data.go:195: Loading test data from /tmp/TestConsulInstallFromURLWithUbuntu18Ami269819328/project/.test-data/TerraformOptions.json
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:03Z save_test_data.go:195: Loading test data from /tmp/TestConsulInstallFromURLWithUbuntu18Ami269819328/project/.test-data/Ec2KeyPair.json
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:03Z retry.go:72: terraform [output -no-color asg_name_servers]
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:03Z command.go:86: Running command terraform with args [output -no-color asg_name_servers]
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:04Z command.go:168: Gqyi0Z-server20210223104315317500000009
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:04Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:04Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:14Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: i/o timeout
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:24Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:24Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:34Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: i/o timeout
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:44Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:44Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:44:54Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: i/o timeout
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:04Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:04Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:07Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:17Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:17Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:17Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:27Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:27Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:27Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:37Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:37Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:37Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:47Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:47Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:47Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:57Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:57Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:45:57Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:46:07Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:46:07Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:46:07Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:46:17Z retry.go:72: Check Enterprise Install
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:46:17Z ssh.go:416: Running command consul --help on ubuntu@35.171.88.85
TestConsulInstallFromURLWithUbuntu18Ami 2021-02-23T10:46:17Z retry.go:84: Check Enterprise Install returned an error: Error running consul command: dial tcp 35.171.88.85:22: connect: connection refused
. Sleeping for 10s and will try again.

Perhaps the enterprise version intermittently fails to start? Or perhaps we just need more retries? @anouarchattouna Could you look into it?