Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions monasca-notification/apk_install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh

install_apk_deps() {
apk add --no-cache mysql-client ca-certificates
apk add --no-cache --virtual build-dep git make g++ linux-headers
Expand Down
8 changes: 3 additions & 5 deletions monasca-notification/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ KAFKA_WAIT_DELAY=${KAFKA_WAIT_DELAY:-"5"}
echo "Waiting for MySQL to become available..."
success="false"
for i in $(seq "$MYSQL_WAIT_RETRIES"); do
mysqladmin status \
if mysqladmin status \
--host="$MYSQL_DB_HOST" \
--port="$MYSQL_DB_PORT" \
--user="$MYSQL_DB_USERNAME" \
--password="$MYSQL_DB_PASSWORD" \
--connect_timeout=10
if [ $? -eq 0 ]; then
--connect_timeout=10; then
echo "MySQL is available, continuing..."
success="true"
break
Expand All @@ -37,8 +36,7 @@ if [ -n "$KAFKA_WAIT_FOR_TOPICS" ]; then
success="false"

for i in $(seq "$KAFKA_WAIT_RETRIES"); do
python /kafka_wait_for_topics.py
if [ $? -eq 0 ]; then
if python /kafka_wait_for_topics.py; then
success="true"
break
else
Expand Down