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

does couch_peruser work? #16

Closed
travbus opened this issue Dec 8, 2019 · 2 comments
Closed

does couch_peruser work? #16

travbus opened this issue Dec 8, 2019 · 2 comments

Comments

@travbus
Copy link

travbus commented Dec 8, 2019

Describe the bug
I can't get couch_peruser config setting to work I'm hoping it's something simple I'm missing happens a lot ha

Version of Helm and Kubernetes:
minikube version: v1.5.2
helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

What happened:
when i make a new user in _users db it is not auto creating a db for that user

What you expected to happen:
auto creating a db for that user

How to reproduce it (as minimally and precisely as possible):
This was my install steps. I also put ingress controller ip in my hosts file to chart-example.local
once I was through the steps I opened
http:https://chart-example.local/_utils in browser

helm repo add couchdb https://apache.github.io/couchdb-helm

kubectl create secret generic couchv1-couchdb --from-literal=adminUsername=travis --from-literal=adminPassword=testPass12 --from-literal=cookieAuthSecret=testPass12secret

helm install couchv1  \
couchdb/couchdb \
--set createAdminSecret=false \
--set clusterSize=3 \
--set ingress.enabled=true \
--set persistentVolume.enabled=true \
--set couch_peruser.enable=true \       // i tried this
--set couchdbConfig.couch_peruser.enable=true \ .  // i tried this and i tried both
--set couchdbConfig.couchdb.uuid=decafbaddecafbaddecafbaddecafbad

curl -X POST -H "Content-Type: application/json" http:https://travis:[email protected]/_cluster_setup -d '{"action": "finish_cluster"}'

Anything else we need to know:
I'm a noob I tried to access the pods couch config file to see what in it for settings but I could not find a way to open or edit the file.

if i run with both couch_peruser in diff spots i get this
Helm get values couchv1
USER-SUPPLIED VALUES:
clusterSize: 3
couch_peruser:
enable: true
couchdbConfig:
couch_peruser:
enable: true
couchdb:
uuid: decafbaddecafbaddecafbaddecafbad
createAdminSecret: false
ingress:
enabled: true
persistentVolume:
enabled: true

this is a user doc that should trigger a new user db when inserted into _users db
well thats it does on my single node install maybe cluster is different?

{
  "_id": "org.couchdb.user:DavidWonderman7",
  "_rev": "1-853d92e2cfe8fb10bb323e967c09c704",
  "name": "DavidWonderman7",
  "roles": [
    "basic"
  ],
  "type": "user",
  "password_scheme": "pbkdf2",
  "iterations": 10,
  "derived_key": "35a0d27874ce314f992ea4918cab8350e9bd99c2",
  "salt": "8e5d888eb4f23277c621d8efc3ad8318"
}
@willholley
Copy link
Member

--set couchdbConfig.couch_peruser.enable=true should set the correct line in the config file. Do the CouchDB logs provide any clues as to why it's not working as expected?

@travbus
Copy link
Author

travbus commented Dec 8, 2019

hmm I'll have to check out how to get the logs. But weirdly enough it is working now. I did fresh install and persistent data was still there but the user dbs showed up. So I tried to recreate. So I deleted helm couch install and deleted persistent volumes. Did the install again. Same issue it wouldn't work. So I did minikube stop. I'm on os x. minikube start. and sure enough the user db showed up and any new _users created is creating a user db right away. Its working! Thanks for the response! For now I'm going to leave it at that. Once I go into production I'll probably hire a couchdb expert to look over everything. Cheers!

@travbus travbus closed this as completed Dec 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants