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

Enable couchdb persist_path in a distributed environment as well #4290

Merged
merged 2 commits into from
Apr 3, 2019

Conversation

style95
Copy link
Member

@style95 style95 commented Feb 15, 2019

Description

This is to enable CouchDB persist_path in a distributed environment as well.
OW operators can freely redeploy CouchDB without any issue as it supports idempotency.
Also, in case new hosts are added in the inventory_host, they will also join the cluster on redeployment.

Related issue and scope

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

@style95
Copy link
Member Author

style95 commented Feb 15, 2019

@rabbah Please take a look at this.

@style95 style95 force-pushed the fix-couchdb-clustering branch 2 times, most recently from ff9bc7a to 518d106 Compare February 15, 2019 11:10
uri:
url: "{{ db.protocol }}://{{ ansible_host }}:{{ db.port }}/_cluster_setup"
method: GET
status_code: 200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this error and return 40x?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely, it will return 401 Unauthorized in case the provided credentials are incorrect.

uri:
url: "{{ db.protocol }}://{{ ansible_host }}:{{ db.port }}/_membership"
method: GET
status_code: 200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same q.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this,

style95ui-iMac:lambda style95$ curl localhost:5984/_membership -v
*   Trying ::1...
* Connected to localhost (::1) port 5984 (#0)
> GET /_membership HTTP/1.1
> Host: localhost:5984
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: CouchDB/2.1.2 (Erlang OTP/17)
< Date: Sun, 17 Feb 2019 14:00:13 GMT
< Content-Type: application/json
< Content-Length: 66
< Cache-Control: must-revalidate
<
{"all_nodes":["nonode@nohost"],"cluster_nodes":["nonode@nohost"]}

@rabbah rabbah added the couchdb label Feb 16, 2019
@rabbah rabbah added the reviewed Review for this PR is finished. It is mergeable from a review's perspective. label Feb 19, 2019
@rabbah rabbah self-assigned this Mar 26, 2019
@rabbah rabbah merged commit 321b3d9 into apache:master Apr 3, 2019
BillZong pushed a commit to BillZong/openwhisk that referenced this pull request Nov 18, 2019
…che#4290)

* Skip clustering when nodes are already in the cluster
* Enable couchdb persist_path for a distributed environment as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
couchdb reviewed Review for this PR is finished. It is mergeable from a review's perspective.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants