Fix for collector kafka startup issue

When first deploying the collector and kafka, it takes
kafka a couple minutes to start. In some cases, the
collector would proceed to startup without waiting for
kafka. This resulted in the first few messages to be dropped,
such as dropping the router init and peer up messages.
This commit is contained in:
Tim Evens 2022-02-01 12:49:17 -08:00
parent a0e6a5bc6f
commit fd2874d00e
5 changed files with 14 additions and 9 deletions

View File

@ -15,8 +15,8 @@
# #
# Example docker build: # Example docker build:
# tar -cL -C ../../ ./obmp-collector ./obmp-docker/collector \ # tar -cL -C ../../ ./obmp-collector ./obmp-docker/collector \
# | docker build --build-arg VERSION=2.0.2 \ # | docker build --build-arg VERSION=2.0.3 \
# -f obmp-docker/collector/Dockerfile -t openbmp/collector:2.0.2 - # -f obmp-docker/collector/Dockerfile -t openbmp/collector:2.0.3 -
# #
# ----------------------------------------------- # -----------------------------------------------

View File

@ -60,6 +60,11 @@ if [[ -f /config/openbmpd.conf ]]; then
OPENBMP_CFG_FILE=/config/openbmpd.conf OPENBMP_CFG_FILE=/config/openbmpd.conf
fi fi
# Startup delay to allow for Kafka to start if not already running
ehco "Waiting 30 seconds to allow for Kafka and other containers to startup."
sleep 30
# Start openbmpd and wait - openbmpd runs in foreground # Start openbmpd and wait - openbmpd runs in foreground
echo "Running openbmpd collector, see /var/log/openbmpd.log " echo "Running openbmpd collector, see /var/log/openbmpd.log "
/usr/bin/openbmpd -f -l /var/log/openbmpd.log -c ${OPENBMP_CFG_FILE} /usr/bin/openbmpd -f -l /var/log/openbmpd.log -c ${OPENBMP_CFG_FILE}

View File

@ -63,7 +63,7 @@ services:
psql: psql:
restart: unless-stopped restart: unless-stopped
container_name: obmp-psql container_name: obmp-psql
image: openbmp/postgres:2.0.2 image: openbmp/postgres:2.0.3
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
@ -78,7 +78,7 @@ services:
collector: collector:
restart: unless-stopped restart: unless-stopped
container_name: obmp-collector container_name: obmp-collector
image: openbmp/collector:2.0.2 image: openbmp/collector:2.0.3
sysctls: sysctls:
- net.ipv4.tcp_keepalive_intvl=30 - net.ipv4.tcp_keepalive_intvl=30
- net.ipv4.tcp_keepalive_probes=5 - net.ipv4.tcp_keepalive_probes=5
@ -93,7 +93,7 @@ services:
psql-app: psql-app:
restart: unless-stopped restart: unless-stopped
container_name: obmp-psql-app container_name: obmp-psql-app
image: openbmp/psql-app:2.0.2 image: openbmp/psql-app:2.0.3
sysctls: sysctls:
- net.ipv4.tcp_keepalive_intvl=30 - net.ipv4.tcp_keepalive_intvl=30
- net.ipv4.tcp_keepalive_probes=5 - net.ipv4.tcp_keepalive_probes=5

View File

@ -3,7 +3,7 @@
# Copyright (c) 2021-2022 Cisco Systems, Inc. and Tim Evens. All rights reserved. # Copyright (c) 2021-2022 Cisco Systems, Inc. and Tim Evens. All rights reserved.
# #
# Build: # Build:
# docker build -t openbmp/postgres:2.0.2 . # docker build -t openbmp/postgres:2.0.3 .
# #
# Run: # Run:
# docker run --rm -it -p 5432:5432 \ # docker run --rm -it -p 5432:5432 \

View File

@ -13,8 +13,8 @@
# #
# Example docker build: # Example docker build:
# tar -cL -C ../../ ./obmp-psql ./obmp-docker/psql-app ./obmp-java-api-message \ # tar -cL -C ../../ ./obmp-psql ./obmp-docker/psql-app ./obmp-java-api-message \
# | docker build --build-arg VERSION=2.0.2 \ # | docker build --build-arg VERSION=2.0.3 \
# -f obmp-docker/psql-app/Dockerfile -t openbmp/psql-app:2.0.2 - # -f obmp-docker/psql-app/Dockerfile -t openbmp/psql-app:2.0.3 -
# ----------------------------------------------- # -----------------------------------------------
# stage: Build # stage: Build