Error occurs when stop the heat-engine.service

Bug #1722446 reported by Shi Yan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Unassigned

Bug Description

Hi,

In the ocata and pike version of heat on ubuntu 16.04, the stop of heat-engine service will trigger the error.

2017-10-09 17:40:58.960 26236 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:58.961 26237 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:58.963 26239 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:58.964 26238 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:58.975 26219 INFO oslo_service.service [-] Caught SIGTERM, stopping children
2017-10-09 17:40:58.975 26219 DEBUG oslo_concurrency.lockutils [-] Acquired semaphore "singleton_lock" lock /usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:215
2017-10-09 17:40:58.976 26219 DEBUG oslo_concurrency.lockutils [-] Releasing semaphore "singleton_lock" lock /usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:228
2017-10-09 17:40:58.976 26219 DEBUG oslo_service.service [-] Stop services. stop /usr/lib/python2.7/dist-packages/oslo_service/service.py:624
2017-10-09 17:40:58.980 26219 CRITICAL heat-engine [req-915752c5-51a0-4cc8-a51e-54e3ab533286 - - - - -] Unhandled error: TypeError: object of type 'NoneType' has no len()
2017-10-09 17:40:58.980 26219 ERROR heat-engine Traceback (most recent call last):
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/bin/heat-engine", line 10, in <module>
2017-10-09 17:40:58.980 26219 ERROR heat-engine sys.exit(main())
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/heat/cmd/engine.py", line 86, in main
2017-10-09 17:40:58.980 26219 ERROR heat-engine launcher.wait()
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 618, in wait
2017-10-09 17:40:58.980 26219 ERROR heat-engine self.stop()
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 628, in stop
2017-10-09 17:40:58.980 26219 ERROR heat-engine service.stop()
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 153, in wrapper
2017-10-09 17:40:58.980 26219 ERROR heat-engine return f(*args, **kwargs)
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/heat/engine/service.py", line 457, in stop
2017-10-09 17:40:58.980 26219 ERROR heat-engine service_objects.Service.delete(ctxt, self.service_id)
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/heat/objects/service.py", line 77, in delete
2017-10-09 17:40:58.980 26219 ERROR heat-engine db_api.service_delete(context, service_id, soft_delete)
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/heat/db/sqlalchemy/api.py", line 1256, in service_delete
2017-10-09 17:40:58.980 26219 ERROR heat-engine service = service_get(context, service_id)
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/heat/db/sqlalchemy/api.py", line 1266, in service_get
2017-10-09 17:40:58.980 26219 ERROR heat-engine result = context.session.query(models.Service).get(service_id)
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 864, in get
2017-10-09 17:40:58.980 26219 ERROR heat-engine return self._get_impl(ident, loading.load_on_ident)
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 875, in _get_impl
2017-10-09 17:40:58.980 26219 ERROR heat-engine if len(ident) != len(mapper.primary_key):
2017-10-09 17:40:58.980 26219 ERROR heat-engine TypeError: object of type 'NoneType' has no len()
2017-10-09 17:40:58.980 26219 ERROR heat-engine
2017-10-09 17:40:59.077 26239 INFO oslo_service.service [-] Parent process has died unexpectedly, exiting
2017-10-09 17:40:59.078 26238 INFO oslo_service.service [-] Parent process has died unexpectedly, exiting
2017-10-09 17:40:59.078 26236 INFO oslo_service.service [-] Parent process has died unexpectedly, exiting
2017-10-09 17:40:59.078 26237 INFO oslo_service.service [-] Parent process has died unexpectedly, exiting
2017-10-09 17:40:59.079 26236 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:59.079 26237 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:59.079 26238 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425
2017-10-09 17:40:59.082 26239 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/python2.7/dist-packages/heat/engine/service.py:425

Using "systemctl stop heat-engine.service" will trigger the error.

It looks like the EngineService object(self) will be initialized again after the _stop_rpc_server() function. Therefore the services delete cannot be performed due to self.service_id is none.

Besides the error, there is no other side effect for the service stop issue. Heat engine service could be started well and running without problems.

Shi Yan (yanshi-403)
description: updated
summary: - Error occurs when restart the heat-engine.service
+ Error occurs when stop the heat-engine.service
Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.