confluentinc / confluentinc/examples

cp-quickstart - start.sh hangs/blocks when run from terraform

Open
#1,267 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

When I run start.sh from an interactive shell it works fine. But when I run it from a script called from terraform, it stops on the first call to check_topic_exists().

I thought maybe it was strange characters causing an issue, so I added the following before calling start.sh:

```
export BUILDKIT_PROGRESS=plain
export COMPOSE_ANSI=never
```

But this has not helped so far. The last thing I see is "Waiting up to 30 seconds for topics (pageviews, users) to exist", but it then sits there until terraform times out

My assumption is this is the line that is blocking:
`docker-compose exec $containerName kafka-topics --bootstrap-server $brokerConn --describe --topic $topic >/dev/null`

Any ideas? Not sure if this qualifies as a bug.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with start.sh and trace the first call to check_topic_exists(), especially the docker-compose exec command using kafka-topics. Reproduce the quickstart from a script invoked by Terraform rather than an interactive shell, and compare its behavior with the interactive case. Done means the topic check no longer blocks until Terraform times out.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, kafka, shell, terraform
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.