Skip to content

Commit e5f9ee1

Browse files
hsheth2pedro93
andauthored
fix(cli/quickstart): handle docker hangs gracefully (datahub-project#8211)
Co-authored-by: Pedro Silva <[email protected]>
1 parent 460f96d commit e5f9ee1

8 files changed

+87
-65
lines changed

docker/docker-compose-without-neo4j.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ services:
4242
env_file: datahub-gms/env/docker-without-neo4j.env
4343
healthcheck:
4444
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
45-
start_period: 20s
45+
start_period: 90s
4646
interval: 1s
47-
retries: 20
47+
retries: 3
4848
timeout: 5s
4949
depends_on:
5050
datahub-upgrade:
@@ -116,9 +116,9 @@ services:
116116
memory: 1G
117117
healthcheck:
118118
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
119-
start_period: 5s
119+
start_period: 20s
120120
interval: 1s
121-
retries: 5
121+
retries: 3
122122
timeout: 5s
123123
volumes:
124124
- esdata:/usr/share/elasticsearch/data
@@ -131,9 +131,9 @@ services:
131131
env_file: schema-registry/env/docker.env
132132
healthcheck:
133133
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
134-
start_period: 5s
134+
start_period: 30s
135135
interval: 1s
136-
retries: 5
136+
retries: 3
137137
timeout: 5s
138138
depends_on:
139139
broker:
@@ -147,7 +147,7 @@ services:
147147
env_file: broker/env/docker.env
148148
healthcheck:
149149
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
150-
start_period: 5s
150+
start_period: 30s
151151
interval: 1s
152152
retries: 5
153153
timeout: 5s
@@ -165,9 +165,9 @@ services:
165165
env_file: zookeeper/env/docker.env
166166
healthcheck:
167167
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
168-
start_period: 2s
168+
start_period: 10s
169169
interval: 5s
170-
retries: 5
170+
retries: 3
171171
timeout: 5s
172172
volumes:
173173
- zkdata:/var/lib/zookeeper

docker/docker-compose.override.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ services:
3636
restart: on-failure
3737
healthcheck:
3838
test: mysqladmin ping -h mysql -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
39-
start_period: 2s
39+
start_period: 10s
4040
interval: 1s
41-
retries: 5
41+
retries: 3
4242
timeout: 5s
4343
volumes:
4444
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql

docker/docker-compose.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ services:
4040
dockerfile: docker/datahub-gms/Dockerfile
4141
healthcheck:
4242
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
43-
start_period: 20s
43+
start_period: 90s
4444
interval: 1s
45-
retries: 20
45+
retries: 3
4646
timeout: 5s
4747
depends_on:
4848
datahub-upgrade:
@@ -119,9 +119,9 @@ services:
119119
memory: 1G
120120
healthcheck:
121121
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
122-
start_period: 5s
122+
start_period: 20s
123123
interval: 1s
124-
retries: 5
124+
retries: 3
125125
timeout: 5s
126126
volumes:
127127
- esdata:/usr/share/elasticsearch/data
@@ -150,9 +150,9 @@ services:
150150
env_file: schema-registry/env/docker.env
151151
healthcheck:
152152
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
153-
start_period: 5s
153+
start_period: 30s
154154
interval: 1s
155-
retries: 5
155+
retries: 3
156156
timeout: 5s
157157
depends_on:
158158
broker:
@@ -166,7 +166,7 @@ services:
166166
env_file: broker/env/docker.env
167167
healthcheck:
168168
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
169-
start_period: 5s
169+
start_period: 30s
170170
interval: 1s
171171
retries: 5
172172
timeout: 5s
@@ -184,9 +184,9 @@ services:
184184
env_file: zookeeper/env/docker.env
185185
healthcheck:
186186
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
187-
start_period: 2s
187+
start_period: 10s
188188
interval: 5s
189-
retries: 5
189+
retries: 3
190190
timeout: 5s
191191
volumes:
192192
- zkdata:/var/lib/zookeeper

docker/quickstart/docker-compose-m1.quickstart.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
healthcheck:
2020
interval: 1s
2121
retries: 5
22-
start_period: 5s
22+
start_period: 30s
2323
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
2424
timeout: 5s
2525
hostname: broker
@@ -105,8 +105,8 @@ services:
105105
- METADATA_SERVICE_AUTH_ENABLED=false
106106
healthcheck:
107107
interval: 1s
108-
retries: 20
109-
start_period: 20s
108+
retries: 3
109+
start_period: 90s
110110
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
111111
timeout: 5s
112112
hostname: datahub-gms
@@ -162,8 +162,8 @@ services:
162162
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
163163
healthcheck:
164164
interval: 1s
165-
retries: 5
166-
start_period: 5s
165+
retries: 3
166+
start_period: 20s
167167
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
168168
timeout: 5s
169169
hostname: elasticsearch
@@ -211,8 +211,8 @@ services:
211211
- MYSQL_ROOT_PASSWORD=datahub
212212
healthcheck:
213213
interval: 1s
214-
retries: 5
215-
start_period: 2s
214+
retries: 3
215+
start_period: 10s
216216
test: mysqladmin ping -h mysql -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
217217
timeout: 5s
218218
hostname: mysql
@@ -268,8 +268,8 @@ services:
268268
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
269269
healthcheck:
270270
interval: 1s
271-
retries: 5
272-
start_period: 5s
271+
retries: 3
272+
start_period: 30s
273273
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
274274
timeout: 5s
275275
hostname: schema-registry
@@ -283,8 +283,8 @@ services:
283283
- ZOOKEEPER_TICK_TIME=2000
284284
healthcheck:
285285
interval: 5s
286-
retries: 5
287-
start_period: 2s
286+
retries: 3
287+
start_period: 10s
288288
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
289289
timeout: 5s
290290
hostname: zookeeper

docker/quickstart/docker-compose-without-neo4j-m1.quickstart.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
healthcheck:
2020
interval: 1s
2121
retries: 5
22-
start_period: 5s
22+
start_period: 30s
2323
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
2424
timeout: 5s
2525
hostname: broker
@@ -100,8 +100,8 @@ services:
100100
- UI_INGESTION_ENABLED=true
101101
healthcheck:
102102
interval: 1s
103-
retries: 20
104-
start_period: 20s
103+
retries: 3
104+
start_period: 90s
105105
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
106106
timeout: 5s
107107
hostname: datahub-gms
@@ -155,8 +155,8 @@ services:
155155
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
156156
healthcheck:
157157
interval: 1s
158-
retries: 5
159-
start_period: 5s
158+
retries: 3
159+
start_period: 20s
160160
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
161161
timeout: 5s
162162
hostname: elasticsearch
@@ -242,8 +242,8 @@ services:
242242
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
243243
healthcheck:
244244
interval: 1s
245-
retries: 5
246-
start_period: 5s
245+
retries: 3
246+
start_period: 30s
247247
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
248248
timeout: 5s
249249
hostname: schema-registry
@@ -257,8 +257,8 @@ services:
257257
- ZOOKEEPER_TICK_TIME=2000
258258
healthcheck:
259259
interval: 5s
260-
retries: 5
261-
start_period: 2s
260+
retries: 3
261+
start_period: 10s
262262
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
263263
timeout: 5s
264264
hostname: zookeeper

docker/quickstart/docker-compose-without-neo4j.quickstart.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
healthcheck:
2020
interval: 1s
2121
retries: 5
22-
start_period: 5s
22+
start_period: 30s
2323
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
2424
timeout: 5s
2525
hostname: broker
@@ -100,8 +100,8 @@ services:
100100
- UI_INGESTION_ENABLED=true
101101
healthcheck:
102102
interval: 1s
103-
retries: 20
104-
start_period: 20s
103+
retries: 3
104+
start_period: 90s
105105
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
106106
timeout: 5s
107107
hostname: datahub-gms
@@ -155,8 +155,8 @@ services:
155155
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
156156
healthcheck:
157157
interval: 1s
158-
retries: 5
159-
start_period: 5s
158+
retries: 3
159+
start_period: 20s
160160
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
161161
timeout: 5s
162162
hostname: elasticsearch
@@ -242,8 +242,8 @@ services:
242242
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
243243
healthcheck:
244244
interval: 1s
245-
retries: 5
246-
start_period: 5s
245+
retries: 3
246+
start_period: 30s
247247
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
248248
timeout: 5s
249249
hostname: schema-registry
@@ -257,8 +257,8 @@ services:
257257
- ZOOKEEPER_TICK_TIME=2000
258258
healthcheck:
259259
interval: 5s
260-
retries: 5
261-
start_period: 2s
260+
retries: 3
261+
start_period: 10s
262262
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
263263
timeout: 5s
264264
hostname: zookeeper

docker/quickstart/docker-compose.quickstart.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
healthcheck:
2020
interval: 1s
2121
retries: 5
22-
start_period: 5s
22+
start_period: 30s
2323
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
2424
timeout: 5s
2525
hostname: broker
@@ -105,8 +105,8 @@ services:
105105
- METADATA_SERVICE_AUTH_ENABLED=false
106106
healthcheck:
107107
interval: 1s
108-
retries: 20
109-
start_period: 20s
108+
retries: 3
109+
start_period: 90s
110110
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
111111
timeout: 5s
112112
hostname: datahub-gms
@@ -162,8 +162,8 @@ services:
162162
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
163163
healthcheck:
164164
interval: 1s
165-
retries: 5
166-
start_period: 5s
165+
retries: 3
166+
start_period: 20s
167167
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
168168
timeout: 5s
169169
hostname: elasticsearch
@@ -211,8 +211,8 @@ services:
211211
- MYSQL_ROOT_PASSWORD=datahub
212212
healthcheck:
213213
interval: 1s
214-
retries: 5
215-
start_period: 2s
214+
retries: 3
215+
start_period: 10s
216216
test: mysqladmin ping -h mysql -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
217217
timeout: 5s
218218
hostname: mysql
@@ -268,8 +268,8 @@ services:
268268
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
269269
healthcheck:
270270
interval: 1s
271-
retries: 5
272-
start_period: 5s
271+
retries: 3
272+
start_period: 30s
273273
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
274274
timeout: 5s
275275
hostname: schema-registry
@@ -283,8 +283,8 @@ services:
283283
- ZOOKEEPER_TICK_TIME=2000
284284
healthcheck:
285285
interval: 5s
286-
retries: 5
287-
start_period: 2s
286+
retries: 3
287+
start_period: 10s
288288
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
289289
timeout: 5s
290290
hostname: zookeeper

0 commit comments

Comments
 (0)