couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randall Leeds (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COUCHDB-128) couchdb is not starting properly from init.d script in trunk
Date Sat, 22 Jan 2011 11:17:45 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Randall Leeds updated COUCHDB-128:
----------------------------------

    Attachment: 0001-always-pass-options-in-init-script-COUCHDB-128.patch

Aha! I'll explain, in too much detail, why I did what I did in a moment. I see why you think
I removed functionality, and that's just a quirk of how code moved interacting with my default
diff settings. Here's a new patch that's *identical* except for having a different hunk context
size for the diff.

The patch passes the pid file option to the stop and status invocations as in Duncan's patch.
The original patch uses the environment variable $COUCHDB_PID_FILE that's not currently used
(documented) in the etc/default/couchdb in the source. However, the -p option, in order to
pass to couchdb, can already be added to $COUCHDB_OPTIONS instead. 

Rather than expand the set of options, I rewrote the patch to pass $COUCHDB_OPTIONS to every
invocation of couchdb. At that point, display_status, stop_couchdb, and start_couchdb all
had code to add $COUCHDB_OPTIONS to the couchdb command line. Additionally, start_couchdb
and stop_couchdb both set the user according to the environment. I took all these duplicate
lines of command assembly and put them into a function called run_command.

It's mostly equivalent to the original patch. It reduces LoC and fixes the problem while avoiding
a new environment variable. I'll grant that it needlessly switches users for status (root
could read a pid file), but it was late and I just got a twitch.

Heh. That was a lot of justification for some diff context confusion. I think. Ow.

> couchdb is not starting properly from init.d script in trunk
> ------------------------------------------------------------
>
>                 Key: COUCHDB-128
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-128
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>            Reporter: Noah Slater
>            Assignee: Noah Slater
>         Attachments: 0001-always-pass-options-in-init-script-COUCHDB-128.patch, couchdb-init.diff
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message