Skip to content

Commit

Permalink
Fix some linter warnings, part 13 (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfishpond authored and matrixik committed Oct 23, 2017
1 parent 28c317f commit dce9505
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
3 changes: 1 addition & 2 deletions monasca-forwarder/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,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
2 changes: 1 addition & 1 deletion monasca-log-agent/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repository: monasca/log-agent
variants:
- tag: 0.0.2
- tag: 0.0.3
aliases:
- :latest
args:
Expand Down
26 changes: 13 additions & 13 deletions monasca-log-agent/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ wait_for_log_api() {
if [ "$1" = "true" ]; then
echo "Waiting for Monasca Log API to become available..."

for i in $(seq $MONASCA_LOG_API_WAIT_RETRIES); do
for i in $(seq "$MONASCA_LOG_API_WAIT_RETRIES"); do
curl --silent --show-error --output - \
"${MONASCA_LOG_API_URL}"/healthcheck 2>&1 && return

Expand All @@ -30,20 +30,20 @@ wait_for_keystone() {
for i in $(seq "$KEYSTONE_WAIT_RETRIES"); do
curl --fail --silent --show-error --output - \
-H "Content-Type: application/json" \
-d '
{ "auth": {
"identity": {
"methods": ["password"],
"password": {
"user": {
"name": "'$OS_USERNAME'",
"domain": { "id": "'$OS_USER_DOMAIN_NAME'" },
"password": "'$OS_PASSWORD'"
-d "
{ \"auth\": {
\"identity\": {
\"methods\": [\"password\"],
\"password\": {
\"user\": {
\"name\": \""$OS_USERNAME"\",
\"domain\": { \"id\": \""$OS_USER_DOMAIN_NAME"\" },
\"password\": \""$OS_PASSWORD"\"
}
}
}
}
}' $OS_AUTH_URL/auth/tokens 2>&1 && return
}" "$OS_AUTH_URL"/auth/tokens 2>&1 && return

echo "Keystone not yet ready (attempt $i of $KEYSTONE_WAIT_RETRIES)"
sleep "$KEYSTONE_WAIT_DELAY"
Expand All @@ -55,8 +55,8 @@ wait_for_keystone() {
fi
}

wait_for_log_api $MONASCA_WAIT_FOR_LOG_API
wait_for_keystone $MONASCA_WAIT_FOR_KEYSTONE
wait_for_log_api "$MONASCA_WAIT_FOR_LOG_API"
wait_for_keystone "$MONASCA_WAIT_FOR_KEYSTONE"

/p2 -t /monasca-log-agent.conf.j2 > /monasca-log-agent.conf

Expand Down

0 comments on commit dce9505

Please sign in to comment.