[Pkg-erlang-devel] Bug#562901: couchdb: wrong use of killall in preinst without pre-depends

Sam Bisbee sbisbee at computervip.com
Tue Dec 29 17:35:13 UTC 2009


Thanks for submitting. 

I'm going to defer the pre-depends/build-depends comments to Sergei who managed
that part of the patch. However, solving the underlying issue will remove the
patch that created the dependency, so I don't think they really need to be
discussed.

On Mon, Dec 28, 2009 at 03:00:33PM -0800, Steve Langasek wrote:
>    Processes running as the couchdb user should be managed by the init
>    script, and it should be regarded as a bug in the init script if they
>    aren't being stopped on upgrade.  

Agreed, and we are aware of problems in the init script surrounding whether or
not the beam process has really stopped when the init script says it has. A few
cases that I have recorded:

 - On upgrade, the previous version of couchdb will still be running in the
   beam process. The user needs to restart couchdb (via init script or other
   means) to get the new code into the process - bad things start happening
   when old code is in the process and it tries to work with the new version's
   resources.

 - On removal, the init script is called to stop couchdb and reports success
   even though the beam process is still running as the couchdb user. This
   causes issues when postrm tries to delete the couchdb user. Also, the server
   is still running and listening after it's been removed, possibly causing
   headaches and certainly security concerns.

Fear not though, as the init script is already on my TODO list in big, bold
letters.

>    Processes running as users *other* than the couchdb user are
>    not affected by the killall command (and should not be), so whatever
>    problem this preinst was meant to work around is still going to affect
>    those users.

I don't think so: this patch was centered around the cases that I listed above,
and not what other packages were doing. 

> I recommend dropping this change entirely, as in the following patch, and if
> necessary improving the init script to correctly manage these processes.

Reiterating, the init script is on my hit list. However, I felt it was much
more important to get the latest code released, even if it was being released
with a stable band aid: the previous release in Debian was _very_ old,
especially considering couchdb's [appreciated] fast paced development. (see
releasing early and often [with stable code])

Also, the patch as it stands does not negatively impact other packages as far
as I can tell and solves the cases I mentioned earlier (which was the "theme"
of the 0.10.0-1 release). Having upgrade problems between stable packages
is/was just unacceptable, and they may date back as far as 0.8.0-1.

I hope to resolve the init issues in either 0.10.1-2 or the next upstream
release, whichever comes first. However, as there is currently a stable band
aid in place, issues that come up that are still getting blood on the screen
(to carry the metaphor) will be given priority.

Thanks again for submitting,

-- 
Sam Bisbee





More information about the Pkg-erlang-devel mailing list