elastic / elastic/elastic-package
Update terraform timeout waiting for healthy container from 10m to 15m
- Dominant language
- Go
- Stars
- 72
- Forks
- 141
- Avg merge
- 19h 42m
- Merged PRs (30d)
- 55
Description
Currently there is a `waitForHealthyTimeout` hardcoded to `10m`:
```go
internal/compose/compose.go
// waitForHealthyTimeout is the maximum duration for WaitForHealthy().
waitForHealthyTimeout = 10 * time.Minute
```
This is causing error when container creation takes more time. Such as `activemq` broker in this example.
```
│ PACKAGE │ DATA STREAM │ TEST TYPE │ TEST NAME │ RESULT │ TIME ELAPSED │
├─────────┼──────────────────┼───────────┼───────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────┤
│ aws_mq │ activemq_metrics │ system │ default │ ERROR: could not setup service: Terraform deployer is unhealthy: timeout waiting for healthy container │ 10m21.894168709s │
```
```
terraform-1 | Terraform will perform the following actions:
terraform-1 |
terraform-1 | # aws_mq_broker.activemq will be created
terraform-1 | + resource "aws_mq_broker" "activemq" {
terraform-1 | + apply_immediately = false
terraform-1 | + arn = (known after apply)
terraform-1 | + authentication_strategy = (known after apply)
terraform-1 | + auto_minor_version_upgrade = true
terraform-1 | + broker_name = "ep-test-41479-activemq"
terraform-1 | + data_replication_mode = (known after apply)
terraform-1 | + deployment_mode = "SINGLE_INSTANCE"
terraform-1 | + engine_type = "ActiveMQ"
terraform-1 | + engine_version = "5.18"
terraform-1 | + host_instance_type = "mq.t3.micro"
....
terraform-1 |
terraform-1 | Plan: 1 to add, 0 to change, 0 to destroy.
terraform-1 | aws_mq_broker.activemq: Creating...
terraform-1 | aws_mq_broker.activemq: Still creating... [10s elapsed]
..........
terraform-1 | aws_mq_broker.activemq: Still creating... [8m20s elapsed]
terraform-1 | aws_mq_broker.activemq: Still creating... [8m30s elapsed]
terraform-1 | aws_mq_broker.activemq: Still creating... [8m40s elapsed]
```
According to aws documentation [Getting started: Creating and connecting to an ActiveMQ broker
](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/getting-started-activemq.html) creating a broker can take up to 15 minutes
> Creating the broker takes about 15 minutes.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in internal/compose/compose.go at the waitForHealthyTimeout constant and follow its use by WaitForHealthy(). Confirm the timeout is updated to accommodate the documented ActiveMQ creation time, then verify the compose-related behavior or tests available in the repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- cli, infrastructure
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100