saltstack / saltstack/salt

Salt couchdb returner does not support couchdb >= 3

Open
#62,544 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Returners severity-high
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description

In CouchDB 3, admin party mode was
removed
,
requiring a username and password. Currently, Salt's couchdb returner does
not require or even allow a username/password. This should be fixed.

Setup

Launch a docker container from the official couchdb image:

docker run --rm -it -e COUCHDB_USER=fnord -e COUCHDB_PASSWORD=fnord -p 5984:5984 --name loose_change couchdb

Now configure your minion to use couchdb:

docker run --rm -it --link loose_change:loose_change saltstack/salt:3004
cat <<EOF> /etc/salt/minion
couchdb.url: http://loose_change:5984
EOF
salt-call --local test.version --return=couchdb

You'll see an error message:

[ERROR   ] Unable to create database 'salt'
[ERROR   ] Nothing logged! Lost data.

We'll need to change up the returner to actually support couchdb 3>=

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Salt's CouchDB returner and reproduce the failure using the official CouchDB Docker image with COUCHDB_USER and COUCHDB_PASSWORD, then the shown minion configuration and salt-call command. Done means the returner accepts credentials and successfully creates or uses the salt database on CouchDB 3 or newer without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.