Bug 1002277

Summary: couchdb startup not respecting local.d and default.d placed ini files
Product: [Fedora] Fedora Reporter: Helio Chissini de Castro <helio>
Component: couchdbAssignee: Peter Lemenkov <lemenkov>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: lemenkov, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: couchdb-1.6.0-9.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-22 03:33:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Helio Chissini de Castro 2013-08-28 19:04:34 UTC
Fedora 19 couchdb package startup script not supports the new
ini placements, defined since version 10.
Referred: http://wiki.apache.org/couchdb/Breaking_changes#Changes_Between_0.9.x_and_0.10.0

Example

Put a config file in /etc/couchdb/local.d/
/etc/couchdb/local.d/mydb.ini

Only the snatdards aare started

Comment 1 Warren Togami 2014-07-03 07:10:04 UTC
couchdb used to be run with the sysv init script which launched the service via /bin/couchdb script.

/bin/couchdb contains:

_add_config_dir () {
    for file in "$1"/*.ini; do
        if [ -r "$file" ]; then
          _add_config_file "$file"
        fi
    done
}

The systemd .service bypasses /bin/couchdb and attempts to run it directly.  It seems this mostly works except it is unable to support expected things like the /etc/couchdb/default.d and /etc/couchdb/local.d directories.

It may seem like a shame to change the systemd service to use /bin/couchdb since most of its service handling code is redundant.  It appears however that running couchdb without /bin/couchdb is not fully supported by upstream.

I am submitting proposed changes to Peter Lemenkov.

Comment 2 Warren Togami 2014-07-03 09:28:07 UTC
I tried running /bin/couchdb instead of erl directly in the systemd service file and things broke horribly with many additional SELinux denials.  I do not recommend that as a solution.

Perhaps simplest would be a systemd-specific shell script to launch the service from systemd.

Comment 3 Warren Togami 2014-07-03 09:29:35 UTC
(Upstream said they plan on dropping the /bin/couchdb script in a future version, so patching it isn't a good solution.)

Comment 4 Fedora Update System 2014-07-03 18:47:34 UTC
couchdb-1.6.0-2.fc20, erlang-ibrowse-4.0.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-7657/couchdb-1.6.0-2.fc20,erlang-ibrowse-4.0.1-1.fc20

Comment 5 Fedora Update System 2014-07-03 20:31:14 UTC
couchdb-1.6.0-2.fc19, erlang-ibrowse-4.0.1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/FEDORA-2014-7645/couchdb-1.6.0-2.fc19,erlang-ibrowse-4.0.1-1.fc19

Comment 6 Fedora Update System 2014-07-04 12:30:18 UTC
Package couchdb-1.6.0-6.fc20, erlang-ibrowse-4.0.1-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing couchdb-1.6.0-6.fc20 erlang-ibrowse-4.0.1-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7657/couchdb-1.6.0-6.fc20,erlang-ibrowse-4.0.1-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-07-22 03:33:09 UTC
couchdb-1.6.0-9.fc19, erlang-ibrowse-4.0.1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-07-22 03:33:51 UTC
couchdb-1.6.0-9.fc20, erlang-ibrowse-4.0.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.