zopectl (Zope2.Startup) start breaks with zdaemon 3 and newer (4)

Bug #1386795 reported by Robert Buchholz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Undecided
Unassigned

Bug Description

When calling "./instance/bin/zopectl start", I am getting the following backtrace:
Traceback (most recent call last):
  File "bin/zopectl", line 9, in <module>
    load_entry_point('Zope2==2.13.22', 'console_scripts', 'zopectl')()
  File "Zope2/Startup/zopectl.py", line 484, in run
    exitstatus = main()
  File "Zope2/Startup/zopectl.py", line 443, in main
    c.onecmd(" ".join(options.args))
  File "/usr/lib64/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "Zope2/Startup/zopectl.py", line 237, in do_start
    ZDCmd.do_start(self, arg)
  File "zdaemon/zdctl.py", line 324, in do_start
    self._start_cond, "daemon process started, pid=%(zd_pid)d")
  File "zdaemon/zdctl.py", line 263, in awhile
    while not cond(n):
  File "zdaemon/zdctl.py", line 284, in _start_cond
    if (n > self.options.start_timeout):
AttributeError: ZopeCtlOptions instance has no attribute 'start_timeout'

I have Zope2-2.13.22 and zdaemon-4.0.0 installed on Python 2.7.

At the core, this problem seems to stem from the fact that Zope2.Startup in its ZopeCmd.do_start calls the super-class as ZDCmd.do_start(self, arg). However, the "ZopeCtlOptions" (from Startup) do not actually inherit from zdaemon's ZDCtlOptions. Thus, the super class is missing required options with a default value.
Apparently[1], this problem is already 2 years old. Is anyone using this tool?

[1] http://zope3.pov.lt/irclogs-zope/%23zope.2012-06-09.log.html

Revision history for this message
Martin Häcker (spamfaenger) wrote :

+1

Revision history for this message
Martin Häcker (spamfaenger) wrote :

If wanted, I could provide a pull request that adds the missing parameter start_timeout to ZopeCtlOptions. Though I'm not sure thats actually the right way to fix this.

Revision history for this message
Martin Häcker (spamfaenger) wrote :

Pull request created: https://github.com/zopefoundation/Zope/pull/13

This plays off the comment at https://github.com/zopefoundation/Zope/blob/08b0e954631f3c3b23ecbc4c6e8a52338fae88da/src/Zope2/Startup/zopectl.py#L112 which states that the created ZopeCtlOptions instance tries to emulate zdaemon.zdctl.ZDCtlOptions - which has this additional parameter and expects it to be there.

Revision history for this message
Tres Seaver (tseaver) wrote :

I will merge as soon as we can get Travis passing. There was no .travis.yml on the 2.13 branch until I added it this morning: can you please merge and re-push? Also, please add a changelog entry to 'docs/CHANGES.rst'.

Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope2:
status: New → Fix Committed
Revision history for this message
Piter Vergara (pitervergara) wrote :

I'm installing Zope2 via pip and the same error occurs. I notice that the last upload to pypi was made in 2014-02-19. Is there any estimate of when this fix will be available in the package available via pypi?
Thanks

Ps.: let me know if this is not the right place to ask about this

Tres Seaver (tseaver)
Changed in zope2:
milestone: none → 2.13.23
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 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/zope2.

Changed in zope2:
status: Fix Committed → 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.