Skip to content

Commit

Permalink
Fix some linter warnings, part 12 (#268)
Browse files Browse the repository at this point in the history
* Fix some linter warnings, part 12
* bump monasca-alarms version

!push monasca-api-python
  • Loading branch information
digitalfishpond authored and kornicameister committed Oct 23, 2017
1 parent bdefc44 commit 96abc71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion monasca-alarms/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repository: monasca/alarms
variants:
- tag: 1.1.3
- tag: 1.1.4
aliases:
- :latest
args:
Expand Down
5 changes: 2 additions & 3 deletions monasca-alarms/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
MONASCA_API_WAIT_RETRIES=${MONASCA_API_WAIT_RETRIES:-"24"}
MONASCA_API_WAIT_DELAY=${MONASCA_API_WAIT_DELAY:-"5"}

if [ "$KEYSTONE_DEFAULTS_ENABLED" == "true" ]; then
if [ "$KEYSTONE_DEFAULTS_ENABLED" = "true" ]; then
export OS_AUTH_URL=${OS_AUTH_URL:-"http://keystone:35357/v3/"}
export OS_USERNAME=${OS_USERNAME:-"mini-mon"}
export OS_PASSWORD=${OS_PASSWORD:-"password"}
Expand All @@ -18,8 +18,7 @@ if [ -n "$MONASCA_WAIT_FOR_API" ]; then
success="false"

for i in $(seq "$MONASCA_API_WAIT_RETRIES"); do
monasca alarm-definition-list --limit 1
if [ $? -eq 0 ]; then
if monasca alarm-definition-list --limit 1; then
success="true"
break
else
Expand Down
2 changes: 2 additions & 0 deletions monasca-api-python/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 curl mysql-client
apk add --no-cache --virtual build-dep git make g++ linux-headers
Expand Down
8 changes: 3 additions & 5 deletions monasca-api-python/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ if [ "$MYSQL_WAIT_RETRIES" != "0" ]; then
echo "Waiting for MySQL to become available..."
success="false"
for i in $(seq "$MYSQL_WAIT_RETRIES"); do
mysqladmin status \
if mysqladmin status \
--host="$MYSQL_HOST" \
--user="$MYSQL_USER" \
--password="$MYSQL_PASSWORD" \
--connect_timeout=10
if [ $? -eq 0 ]; then
--connect_timeout=10; then
echo "MySQL is available, continuing..."
success="true"
break
Expand All @@ -42,8 +41,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

0 comments on commit 96abc71

Please sign in to comment.