error: DetachedInstanceError: Parent instance <VolumeAttachment at 0x7233610>

Bug #1820155 reported by Chhavi Agarwal on 2019-03-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Unassigned

Bug Description

While running any of Deploy or attach operations the cinder/api.log throws the below error

From api.log:

2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault [req-fdbd4663-76cd-482f-9b6f-20a1932fdc29 fd94514a38c8ad3e60a096ca3276aa317353e90700720bcfb5fb9a039a6465e7 fd4e15188a124e0ba89575f6fd74b575 - 03ba6e2d88854bf8ae334e16e5a4eb47 03ba6e2d88854bf8ae334e16e5a4eb47] Caught error: <class 'sqlalchemy.orm.exc.DetachedInstanceError'> Parent instance <VolumeAttachment at 0xa77e210> is not bound to a Session; lazy load operation of attribute 'volume' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3): DetachedInstanceError: Parent instance <VolumeAttachment at 0xa77e210> is not bound to a Session; lazy load operation of attribute 'volume' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault Traceback (most recent call last):
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/api/middleware/fault.py", line 85, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return req.get_response(self.application)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/request.py", line 1314, in send
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault application, catch_exc_info=False)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/request.py", line 1278, in call_application
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 143, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 129, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault resp = self.call_func(req, *args, **kw)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 193, in call_func
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 112, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return request.get_response(self.application)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/request.py", line 1314, in send
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault application, catch_exc_info=False)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/request.py", line 1278, in call_application
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 129, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault resp = self.call_func(req, *args, **kw)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 193, in call_func
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 335, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault response = req.get_response(self._app)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/request.py", line 1314, in send
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault application, catch_exc_info=False)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/request.py", line 1278, in call_application
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault app_iter = application(self.environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 143, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 143, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 141, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault response = self.app(environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 143, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return resp(environ, start_response)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 129, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault resp = self.call_func(req, *args, **kw)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/webob/dec.py", line 193, in call_func
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return self.func(req, *args, **kwargs)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/api/openstack/wsgi.py", line 844, in __call__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault content_type, body, accept)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/api/openstack/wsgi.py", line 904, in _process_stack
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault action_result = self.dispatch(meth, request, action_args)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/api/openstack/wsgi.py", line 999, in dispatch
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return method(req=request, **action_args)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/api/v2/volumes.py", line 90, in detail
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return self._get_volumes(req, is_detail=True)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/api/v3/volumes.py", line 131, in _get_volumes
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault offset=offset)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/volume/api.py", line 629, in get_all
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault offset=offset)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/objects/volume.py", line 617, in get_all
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault volumes, expected_attrs=expected_attrs)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 1133, in obj_make_list
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault **extra_args)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/objects/volume.py", line 290, in _from_db_object
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault db_volume.get('volume_attachment'))
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 1133, in obj_make_list
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault **extra_args)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/cinder/objects/volume_attachment.py", line 99, in _from_db_object
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault db_volume = db_attachment.get('volume')
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/models.py", line 70, in get
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return getattr(self, key, default)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 242, in __get__
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault return self.impl.get(instance_state(instance), dict_)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 601, in get
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault value = self.callable_(state, passive)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/strategies.py", line 596, in _load_for_state
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault (orm_util.state_str(state), self.key)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault DetachedInstanceError: Parent instance <VolumeAttachment at 0xa77e210> is not bound to a Session; lazy load operation of attribute 'volume' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
2019-02-27 23:51:08.198 83059 ERROR cinder.api.middleware.fault
2019-02-27 23:51:08.282 83059 INFO cinder.api.middleware.fault [req-fdbd4663-76cd-482f-9b6f-20a1932fdc29 fd94514a38c8ad3e60a096ca3276aa317353e90700720bcfb5fb9a039a6465e7 fd4e15188a124e0ba89575f6fd74b575 - 03ba6e2d88854bf8ae334e16e5a4eb47 03ba6e2d88854bf8ae334e16e5a4eb47] http://localhost:9000/v3/fd4e15188a124e0ba89575f6fd74b575/volumes/detail?all_tenants=True returned with HTTP bhk3
2019-02-27 23:51:08.283 83059 INFO eventlet.wsgi.server [req-fdbd4663-76cd-482f-9b6f-20a1932fdc29 fd94514a38c8ad3e60a096ca3276aa317353e90700720bcfb5fb9a039a6465e7 fd4e15188a124e0ba89575f6fd74b575 - 03ba6e2d88854bf8ae334e16e5a4eb47 03ba6e2d88854bf8ae334e16e5a4eb47] 9.47.83.237,127.0.0.1 "GET /v3/fd4e15188a124e0ba89575f6fd74b575/volumes/detail?all_tenants=True HTTP/1.1" status: 500 len: 469 time: 3.6156731

openstack-cinder-13.0.0.tar.gz

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers