hashicorp / consul-terraform-sync

Consul Terraform Sync is a service-oriented tool for managing network infrastructure near real-time.
Mozilla Public License 2.0
120 stars 27 forks source link

Increase time.Sleep #1067

Closed absolutelightning closed 10 months ago

absolutelightning commented 11 months ago

Issue - NET-4886

Issue - When services are registered with checks, initially they are in critical status. When health check passes, they get in passing status. Without this delay, CatalogServices may have services that are not yet propagated to HealthServices as healthy services since services are initially set as critical.

The API call from CTS to Consul has passing set to true. It only returns passing health check services or healthy services.

The delay is small. It might take more time to make service healthy. Hence this PR increases the delay.

Tests - Manually tested it using Nomad and Consul + CTS setup using Terraform Cloud driver. Changes in PR has resolved the issue. Also verified by @maksimnosal