if bulidout re-creates the part of a running zope instance, restarting doesn't work

Bug #489159 reported by Alex Morega
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
zdaemon
Invalid
Undecided
Unassigned

Bug Description

A zope instance, created using plone.recipe.zope2instance, is running. If I change the buildout configuration and re-run buildout, and this results in uninstalling + installing, then the "restart" command will not work (either the shell command, or the ZMI button in control panel). Stop, followed by start, works fine though.

description: updated
Revision history for this message
Alex Morega (alex-morega) wrote :

I finally figured it out: the Zope 2 daemon manager would spawn a new Zope process with the current directory pointing to the recently-removed instance folder. Modifying Zope-2.10.9/lib/python/zdaemon/zdrun.py to update the cwd fixed the problem. I'm wondering if the fix could be made part of plone.recipe.zope2instance.

Revision history for this message
Hanno Schlichting (hannosch) wrote :

The provided patch is against zdaemon, where this should be considered. It seems this is a general problem and could happen to any process, not just Zope2.

affects: collective.buildout → zdaemon
Revision history for this message
Christian Theune (ctheune) wrote :

Hah, one of the long-running things that annoys me. :) I do know that the zope3 recipes do not have that issue, although they also make use of zdaemon.

Revision history for this message
Roman Horenovsky (rhproperty) wrote :

Hello, I assume that this is the same problem I'm experiencing when attempting to restart any process (see bellow) - zdaemon gives "daemon manager not running" when I use 'restart' command.

Any plans fixing it so we can use the 'restart' command? I'm using zdaemon 3.0.5 from pypi on Ubuntu 12.04 32bit.

Regards, Roman

roman@roman-VirtualBox:~/zdaemon$ zdaemon -p 'sleep 100' start
.
daemon process started, pid=5012
roman@roman-VirtualBox:~/zdaemon$ zdaemon -p 'sleep 100' stop

daemon process stopped
roman@roman-VirtualBox:~/zdaemon$ zdaemon -p 'sleep 100' start
.
daemon process started, pid=5018
roman@roman-VirtualBox:~/zdaemon$ zdaemon -p 'sleep 100' restart
. . . . . . . . . . .
daemon manager not running

Revision history for this message
celeron55 (celeron55) wrote :

I am having this same issue on zdaemon 3.0.5 on fedora 20 when running miscellaneous processes.

It looks like this hasn't been fixed in 4.0.0 either.

Revision history for this message
Colin Watson (cjwatson) wrote :

The zdaemon project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zdaemon.

Changed in zdaemon:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.