Error when restart heat-engine

Bug #1448186 reported by Tatiana Kholkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Oleksii Chuprykov

Bug Description

When I restart hean-engine it shows the following error:

2015-04-24 11:10:25.761 TRACE heat-engine Traceback (most recent call last):
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/bin/heat-engine", line 74, in <module>
2015-04-24 11:10:25.761 TRACE heat-engine launcher = service.launch(srv, workers=cfg.CONF.num_engine_workers)
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/openstack/common/service.py", line 493, in launch
2015-04-24 11:10:25.761 TRACE heat-engine launcher.launch_service(service, workers=workers)
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/openstack/common/service.py", line 328, in launch_service
2015-04-24 11:10:25.761 TRACE heat-engine self._start_child(wrap)
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/openstack/common/service.py", line 309, in _start_child
2015-04-24 11:10:25.761 TRACE heat-engine status, signo = self._child_wait_for_exit_or_signal(launcher)
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/openstack/common/service.py", line 267, in _child_wait_for_exit_or_signal
2015-04-24 11:10:25.761 TRACE heat-engine launcher.stop()
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/openstack/common/service.py", line 125, in stop
2015-04-24 11:10:25.761 TRACE heat-engine self.services.stop()
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/openstack/common/service.py", line 453, in stop
2015-04-24 11:10:25.761 TRACE heat-engine service.stop()
2015-04-24 11:10:25.761 TRACE heat-engine File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-04-24 11:10:25.761 TRACE heat-engine return f(*args, **kwargs)
2015-04-24 11:10:25.761 TRACE heat-engine File "/opt/stack/heat/heat/engine/service.py", line 380, in stop
2015-04-24 11:10:25.761 TRACE heat-engine for stack_id in six.iterkeys(self.thread_group_mgr.groups):
2015-04-24 11:10:25.761 TRACE heat-engine RuntimeError: dictionary changed size during iteration

Changed in heat:
assignee: nobody → Tetiana Lashchova (tlashchova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
Changed in heat:
assignee: Tetiana Lashchova (tlashchova) → Oleksii Chuprykov (ochuprykov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/177318
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=b298e425c8eac20f576e0690c0aec82c321a3a2f
Submitter: Jenkins
Branch: master

commit b298e425c8eac20f576e0690c0aec82c321a3a2f
Author: Tetiana Lashchova <email address hidden>
Date: Fri Apr 24 18:27:21 2015 +0300

    Use list instead of iterator in `for` loop for modifiable collection

    six.iterkeys() returns iterator. Using this iterator while
    removing entries from dict may raise RuntimeError. So we
    shouldn't use iterator in this place. Use list of `stack_id`
    values instead.
    For py2 we can use .keys(), but .keys() method returns `view`
    in py3 and this will lead to the same error as with using
    six.iterkeys(). Apply list() to the result given by .keys() to
    produce the same behaviour for py2 and py3.
    Also refactor tests to make sure that there are no problems
    with iterators.

    Co-Authored-By: Oleksii Chuprykov <email address hidden>
    Change-Id: Ice43e18173b4b523d98703bca60819d0e62cfc91
    Closes-Bug: #1448186

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-1 → 5.0.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.