hashicorp / terraform-aws-consul

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

Ignore changes to target group arns in consul-cluster ASG #188

Closed andrew-womeldorf closed 4 years ago

andrew-womeldorf commented 4 years ago

Related to https://github.com/hashicorp/terraform-aws-vault/issues/210

A similar PR into terraform-aws-vault is here

brikis98 commented 4 years ago

All the tests failed with this sort of error:

TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168: Error: ConflictsWith
TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168:   on modules/consul-cluster/main.tf line 19, in resource "aws_autoscaling_group" "autoscaling_group":
TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168:   19:   availability_zones  = var.availability_zones
TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168: 
TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168: "availability_zones": conflicts with vpc_zone_identifier
TestConsulClusterWithUbuntu18Ami 2020-08-31T08:57:07Z command.go:168: 

I think this was fixed in https://github.com/hashicorp/terraform-aws-consul/pull/182... Were you perhaps on an older version of the code? If so, could you rebase on the latest from master?

andrew-womeldorf commented 4 years ago

Yes, it's definitely possible I was on an older version of the code. I pulled master and rebased my branch. Would you mind kicking off the tests again?

brikis98 commented 4 years ago

Re-running tests now!

brikis98 commented 4 years ago

Hm, getting some test failures. The cluster deploys, but the test doesn't seem to be able to connect:

TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:09:59Z retry.go:72: Check Consul members
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:09:59Z retry.go:84: Check Consul members returned an error: Get http://54.175.203.50:8500/v1/agent/members: dial tcp 54.175.203.50:8500: connect: connection refused. Sleeping for 10s and will try again.
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:09Z retry.go:72: Check Consul members
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:09Z retry.go:84: Check Consul members returned an error: Get http://54.175.203.50:8500/v1/agent/members: dial tcp 54.175.203.50:8500: connect: connection refused. Sleeping for 10s and will try again.
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:19Z retry.go:72: Check Consul members
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:19Z retry.go:84: Check Consul members returned an error: Get http://54.175.203.50:8500/v1/agent/members: dial tcp 54.175.203.50:8500: connect: connection refused. Sleeping for 10s and will try again.
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:29Z retry.go:72: Check Consul members
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:29Z retry.go:84: Check Consul members returned an error: Get http://54.175.203.50:8500/v1/agent/members: dial tcp 54.175.203.50:8500: connect: connection refused. Sleeping for 10s and will try again.
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:39Z retry.go:72: Check Consul members
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:39Z retry.go:84: Check Consul members returned an error: Get http://54.175.203.50:8500/v1/agent/members: dial tcp 54.175.203.50:8500: connect: connection refused. Sleeping for 10s and will try again.
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:49Z retry.go:72: Check Consul members
TestConsulClusterWithEncryptionUbuntu18Ami 2020-09-01T11:10:49Z retry.go:84: Check Consul members returned an error: Get http://54.175.203.50:8500/v1/agent/members: dial tcp 54.175.203.50:8500: connect: connection refused. Sleeping for 10s and will try again.

Perhaps something is failing to boot up on the server? Were you able to get everything working in local testing? Did the server nodes come up and successfully form a quorum?

I also just re-ran the tests to see if it could've been a transient / timing issue.

brikis98 commented 4 years ago

OK, tests passed on re-run. Must have been some transient issue. Merging now!

brikis98 commented 4 years ago

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