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.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 no self.service_id.
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.
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.980 26219 CRITICAL heat-engine [req-915752c5- 51a0-4cc8- a51e-54e3ab5332 86 - - - - -] Unhandled error: TypeError: object of type 'NoneType' has no len() heat-engine" , line 10, in <module> python2. 7/dist- packages/ heat/cmd/ engine. py", line 86, in main python2. 7/dist- packages/ oslo_service/ service. py", line 618, in wait python2. 7/dist- packages/ oslo_service/ service. py", line 628, in stop python2. 7/dist- packages/ osprofiler/ profiler. py", line 153, in wrapper python2. 7/dist- packages/ heat/engine/ service. py", line 457, in stop objects. Service. delete( ctxt, self.service_id) python2. 7/dist- packages/ heat/objects/ service. py", line 77, in delete service_ delete( context, service_id, soft_delete) python2. 7/dist- packages/ heat/db/ sqlalchemy/ api.py" , line 1256, in service_delete get(context, service_id) python2. 7/dist- packages/ heat/db/ sqlalchemy/ api.py" , line 1266, in service_get session. query(models. Service) .get(service_ id) python2. 7/dist- packages/ sqlalchemy/ orm/query. py", line 864, in get impl(ident, loading. load_on_ ident) python2. 7/dist- packages/ sqlalchemy/ orm/query. py", line 875, in _get_impl primary_ key): service [-] Parent process has died unexpectedly, exiting service [-] Parent process has died unexpectedly, exiting service [-] Parent process has died unexpectedly, exiting service [-] Parent process has died unexpectedly, exiting python2. 7/dist- packages/ heat/engine/ service. py:425 python2. 7/dist- packages/ heat/engine/ service. py:425 python2. 7/dist- packages/ heat/engine/ service. py:425 python2. 7/dist- packages/ heat/engine/ service. py:425
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/
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/
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/
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/
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/
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/
2017-10-09 17:40:58.980 26219 ERROR heat-engine service_
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/
2017-10-09 17:40:58.980 26219 ERROR heat-engine db_api.
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/
2017-10-09 17:40:58.980 26219 ERROR heat-engine service = service_
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/
2017-10-09 17:40:58.980 26219 ERROR heat-engine result = context.
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/
2017-10-09 17:40:58.980 26219 ERROR heat-engine return self._get_
2017-10-09 17:40:58.980 26219 ERROR heat-engine File "/usr/lib/
2017-10-09 17:40:58.980 26219 ERROR heat-engine if len(ident) != len(mapper.
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.
2017-10-09 17:40:59.078 26238 INFO oslo_service.
2017-10-09 17:40:59.078 26236 INFO oslo_service.
2017-10-09 17:40:59.078 26237 INFO oslo_service.
2017-10-09 17:40:59.079 26236 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/
2017-10-09 17:40:59.079 26237 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/
2017-10-09 17:40:59.079 26238 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/
2017-10-09 17:40:59.082 26239 DEBUG heat.engine.service [-] Attempting to stop engine service... _stop_rpc_server /usr/lib/
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 no self.service_id.
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.