openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rab...@apache.org
Subject [incubator-openwhisk] branch master updated: Use redis-cli (via docker) to test status of Redis in ansible PING-PONG. (#4205)
Date Sat, 09 Feb 2019 15:23:15 GMT
This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new fbf9f25  Use redis-cli (via docker) to test status of Redis in ansible PING-PONG.
(#4205)
fbf9f25 is described below

commit fbf9f2559bc8295f1773efa4271f42819b29676b
Author: Jonathan Springer <jonpspri@gmail.com>
AuthorDate: Sat Feb 9 10:23:09 2019 -0500

    Use redis-cli (via docker) to test status of Redis in ansible PING-PONG. (#4205)
---
 ansible/roles/redis/tasks/deploy.yml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ansible/roles/redis/tasks/deploy.yml b/ansible/roles/redis/tasks/deploy.yml
index 5023e45..5d37e71 100644
--- a/ansible/roles/redis/tasks/deploy.yml
+++ b/ansible/roles/redis/tasks/deploy.yml
@@ -26,10 +26,8 @@
       "docker-entrypoint.sh --requirepass {{ redis.password }}"
 
 - name: wait until redis is up and running
-# using RESP protocol to set redis password and validate it's up
-# inspired by: https://www.compose.com/articles/how-to-talk-raw-redis/
-  action: shell (printf "*2\r\n\$4\r\nAUTH\r\n\${{redis.password|length}}\r\n{{ redis.password
}}\r\n*1\r\n\$4\r\nPING\r\n"; sleep 1) | nc {{ ansible_host }} {{ redis.port }}
+  shell: "docker run --link redis:redis --rm redis:{{ redis.version }} redis-cli -h redis
-p 6379 -a {{ redis.password }} ping"
   register: result
-  until: (result.rc == 0) and (result.stdout == '+OK\r\n+PONG')
+  until: (result.rc == 0) and (result.stdout == 'PONG')
   retries: 12
   delay: 5


Mime
View raw message