Bug 1002277 - couchdb startup not respecting local.d and default.d placed ini files
Summary: couchdb startup not respecting local.d and default.d placed ini files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: couchdb
Version: 19
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-28 19:04 UTC by Helio Chissini de Castro
Modified: 2014-07-22 03:33 UTC (History)
2 users (show)

Fixed In Version: couchdb-1.6.0-9.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-22 03:33:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.