Stopping neutron server with rpc workers raises exeption

Bug #1387053 reported by Jakub Libosvar
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Jakub Libosvar
Juno
Fix Released
Medium
Jakub Libosvar

Bug Description

2014-10-28 15:53:38.090 62623 INFO neutron.openstack.common.service [-] Caught SIGTERM, stopping children
2014-10-28 15:53:38.091 62623 INFO neutron.openstack.common.service [-] Waiting on 1 children to exit
2014-10-28 15:53:38.114 62635 INFO neutron.openstack.common.service [-] Child caught SIGTERM, exiting
2014-10-28 15:53:38.116 62635 TRACE neutron.service Traceback (most recent call last):
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/service.py", line 159, in serve_rpc
2014-10-28 15:53:38.116 62635 TRACE neutron.service launcher.launch_service(rpc, workers=cfg.CONF.rpc_workers)
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 341, in launch_service
2014-10-28 15:53:38.116 62635 TRACE neutron.service self._start_child(wrap)
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 322, in _start_child
2014-10-28 15:53:38.116 62635 TRACE neutron.service status, signo = self._child_wait_for_exit_or_signal(launcher)
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 280, in _child_wait_for_exit_or_signal
2014-10-28 15:53:38.116 62635 TRACE neutron.service launcher.stop()
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 128, in stop
2014-10-28 15:53:38.116 62635 TRACE neutron.service self.services.stop()
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 470, in stop
2014-10-28 15:53:38.116 62635 TRACE neutron.service service.stop()
2014-10-28 15:53:38.116 62635 TRACE neutron.service File "/usr/lib/python2.7/site-packages/neutron/service.py", line 132, in stop
2014-10-28 15:53:38.116 62635 TRACE neutron.service server.kill()
2014-10-28 15:53:38.116 62635 TRACE neutron.service AttributeError: 'MessageHandlingServer' object has no attribute 'kill'
2014-10-28 15:53:38.116 62635 TRACE neutron.service
2014-10-28 15:53:38.471 62635 TRACE neutron Traceback (most recent call last):
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/bin/neutron-server", line 10, in <module>
2014-10-28 15:53:38.471 62635 TRACE neutron sys.exit(main())
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/server/__init__.py", line 51, in main
2014-10-28 15:53:38.471 62635 TRACE neutron neutron_rpc = service.serve_rpc()
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/service.py", line 163, in serve_rpc
2014-10-28 15:53:38.471 62635 TRACE neutron LOG.exception(_('Unrecoverable error: please check log '
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/openstack/common/excutils.py", line 82, in __exit__
2014-10-28 15:53:38.471 62635 TRACE neutron six.reraise(self.type_, self.value, self.tb)
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/service.py", line 159, in serve_rpc
2014-10-28 15:53:38.471 62635 TRACE neutron launcher.launch_service(rpc, workers=cfg.CONF.rpc_workers)
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 341, in launch_service
2014-10-28 15:53:38.471 62635 TRACE neutron self._start_child(wrap)
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 322, in _start_child
2014-10-28 15:53:38.471 62635 TRACE neutron status, signo = self._child_wait_for_exit_or_signal(launcher)
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 280, in _child_wait_for_exit_or_signal
2014-10-28 15:53:38.471 62635 TRACE neutron launcher.stop()
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 128, in stop
2014-10-28 15:53:38.471 62635 TRACE neutron self.services.stop()
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/openstack/common/service.py", line 470, in stop
2014-10-28 15:53:38.471 62635 TRACE neutron service.stop()
2014-10-28 15:53:38.471 62635 TRACE neutron File "/usr/lib/python2.7/site-packages/neutron/service.py", line 132, in stop
2014-10-28 15:53:38.471 62635 TRACE neutron server.kill()
2014-10-28 15:53:38.471 62635 TRACE neutron AttributeError: 'MessageHandlingServer' object has no attribute 'kill'
2014-10-28 15:53:38.471 62635 TRACE neutron

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/131673

Changed in neutron:
assignee: nobody → Jakub Libosvar (libosvar)
status: New → In Progress
Alan Pevec (apevec)
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Alan Pevec (apevec) wrote :

FWIW server.kill() seems to be leftover from Icehouse:
    def stop(self):
        if isinstance(self._server, eventlet.greenthread.GreenThread):
            self._server.kill()
            self._server = None

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/131673
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=42f4c8d0e693a7ef8b058111f5e1bf1ecc618620
Submitter: Jenkins
Branch: master

commit 42f4c8d0e693a7ef8b058111f5e1bf1ecc618620
Author: Jakub Libosvar <email address hidden>
Date: Wed Oct 29 10:02:10 2014 +0100

    Use stop() method on MessageHandlingServer

    MessageHandlingServer has no kill() method. In case neutron server using
    rpc workers and is stopped, wrong method is called.

    Change-Id: Id4a11f3dca070e684fb9e079139ac09792bc7aad
    Closes-Bug: 1387053

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/146399

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/juno)

Reviewed: https://review.openstack.org/146399
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=66a91ddd601f5d2644af7bf82cd23cfe6dcd4322
Submitter: Jenkins
Branch: stable/juno

commit 66a91ddd601f5d2644af7bf82cd23cfe6dcd4322
Author: Jakub Libosvar <email address hidden>
Date: Wed Oct 29 10:02:10 2014 +0100

    Use stop() method on MessageHandlingServer

    MessageHandlingServer has no kill() method. In case neutron server using
    rpc workers and is stopped, wrong method is called.

    Change-Id: Id4a11f3dca070e684fb9e079139ac09792bc7aad
    Closes-Bug: 1387053
    (cherry picked from commit 42f4c8d0e693a7ef8b058111f5e1bf1ecc618620)

Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
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.