Engine service stop or restart 'NoneType' object has no attribute 'stop'

Bug #1735064 reported by chenyb4
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
senlin
New
Undecided
chenyb4

Bug Description

When senlin-engine service stop or restart appear error.

2017-11-28 23:19:15.289 2820 INFO senlin.engine.service [-] Stopping health manager for engine None
2017-11-28 23:19:15.289 2820 CRITICAL senlin-engine [-] AttributeError: 'NoneType' object has no attribute 'stop'
2017-11-28 23:19:15.289 2820 ERROR senlin-engine Traceback (most recent call last):
2017-11-28 23:19:15.289 2820 ERROR senlin-engine File "/usr/bin/senlin-engine", line 10, in <module>
2017-11-28 23:19:15.289 2820 ERROR senlin-engine sys.exit(main())
2017-11-28 23:19:15.289 2820 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/senlin/cmd/engine.py", line 49, in main
2017-11-28 23:19:15.289 2820 ERROR senlin-engine launcher.wait()
2017-11-28 23:19:15.289 2820 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 619, in wait
2017-11-28 23:19:15.289 2820 ERROR senlin-engine self.stop()
2017-11-28 23:19:15.289 2820 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 628, in stop
2017-11-28 23:19:15.289 2820 ERROR senlin-engine service.stop()
2017-11-28 23:19:15.289 2820 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/senlin/engine/service.py", line 174, in stop
2017-11-28 23:19:15.289 2820 ERROR senlin-engine health_mgr.stop()
2017-11-28 23:19:15.289 2820 ERROR senlin-engine AttributeError: 'NoneType' object has no attribute 'stop'
2017-11-28 23:19:15.289 2820 ERROR senlin-engine

2017-11-28 23:13:37.745 2583 INFO senlin.engine.service [-] Stopping dispatcher for engine None
2017-11-28 23:13:37.745 2583 CRITICAL senlin-engine [-] AttributeError: 'EngineService' object has no attribute 'dispatcher'
2017-11-28 23:13:37.745 2583 ERROR senlin-engine Traceback (most recent call last):
2017-11-28 23:13:37.745 2583 ERROR senlin-engine File "/usr/bin/senlin-engine", line 10, in <module>
2017-11-28 23:13:37.745 2583 ERROR senlin-engine sys.exit(main())
2017-11-28 23:13:37.745 2583 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/senlin/cmd/engine.py", line 49, in main
2017-11-28 23:13:37.745 2583 ERROR senlin-engine launcher.wait()
2017-11-28 23:13:37.745 2583 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 619, in wait
2017-11-28 23:13:37.745 2583 ERROR senlin-engine self.stop()
2017-11-28 23:13:37.745 2583 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 628, in stop
2017-11-28 23:13:37.745 2583 ERROR senlin-engine service.stop()
2017-11-28 23:13:37.745 2583 ERROR senlin-engine File "/usr/lib/python2.7/site-packages/senlin/engine/service.py", line 160, in stop
2017-11-28 23:13:37.745 2583 ERROR senlin-engine # Notify dispatcher to stop all action threads it started.
2017-11-28 23:13:37.745 2583 ERROR senlin-engine AttributeError: 'EngineService' object has no attribute 'dispatcher'

chenyb4 (chenyb4)
Changed in senlin:
assignee: nobody → chenyb4 (chenyb4)
Revision history for this message
chenyb4 (chenyb4) wrote :

In senlin-engine num_engine_workers env, must stop all running thread.

In this code https://github.com/openstack/senlin/blob/master/senlin/engine/service.py#L166 stop only
one.

The code must change to:

Engine service init:
self.dispatchers = []

Engine dispatcher start:
self.dispatchers.append(self.dispatcher) when self.dispatcher start after

Engine dispatcher stop:
for dispatcher in self.dispatchers:
            dispatcher.stop()

Revision history for this message
miaoyuliang (mylaliang) wrote :

I met the same problem in ocata. How did you solve it?

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.