You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/02/17 14:00:24 UTC

[GitHub] style95 commented on a change in pull request #4290: Enable couchdb persist_path in a distributed environment as well

style95 commented on a change in pull request #4290: Enable couchdb persist_path in a distributed environment as well
URL: https://github.com/apache/incubator-openwhisk/pull/4290#discussion_r257505252
 
 

 ##########
 File path: ansible/roles/couchdb/tasks/deploy.yml
 ##########
 @@ -88,6 +92,45 @@
     force_basic_auth: yes
   when: (create_users_db.status == 404) and (inventory_hostname == coordinator) and (couchdb.version is version_compare('2.0','>='))
 
+- name: check whether couchdb is clustered
+  uri:
+    url: "{{ db.protocol }}://{{ ansible_host }}:{{ db.port }}/_cluster_setup"
+    method: GET
+    status_code: 200
 
 Review comment:
   In case the cluster is not formed yet, it will return like this:
   
   ```
   $ curl localhost:5984/_cluster_setup -v
   *   Trying ::1...
   * Connected to localhost (::1) port 5984 (#0)
   > GET /_cluster_setup HTTP/1.1
   > Host: localhost:5984
   > User-Agent: curl/7.43.0
   > Accept: */*
   >
   < HTTP/1.1 200 OK
   < X-CouchDB-Body-Time: 0
   < X-Couch-Request-ID: 30fa78e069
   < Server: CouchDB/2.1.2 (Erlang OTP/17)
   < Date: Sun, 17 Feb 2019 13:59:41 GMT
   < Content-Type: application/json
   < Content-Length: 29
   < Cache-Control: must-revalidate
   <
   {"state":"cluster_disabled"}
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services