Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some linter warnings, part 12 #268

Merged
merged 10 commits into from
Oct 23, 2017
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