griddynamics/openstack — Issue #16:  Parent instance <FixedIp at 0x6581810> is not bound to a Session; lazy load operation of attribute 'network' cannot proceed
Author: sstent
Created: 2012-02-29 23:13:45+00:00
State: open

2012-02-29 17:52:45,338 nova.compute.api: Casting to scheduler for test/sstent's instance 2274 (single-shot) from (pid=13007) _ask_scheduler_to_create_instance /usr/lib/python2.6/site-packages/nova/compute/api.py:455
2012-02-29 17:52:45,339 nova.rpc: Making asynchronous cast on scheduler... from (pid=13007) cast /usr/lib/python2.6/site-packages/nova/rpc/impl_kombu.py:766
2012-02-29 17:52:45,393 nova.compute.api: Searching by: {'deleted': False, 'reservation_id': 'r-pjl0ah0n'} from (pid=13007) get_all /usr/lib/python2.6/site-packages/nova/compute/api.py:887
2012-02-29 17:52:45,667 nova.api: ERROR [fed7ad71-fa76-438a-b70f-85ea30811a06 sstent test] Unexpected error raised: Parent instance is not bound to a Session; lazy load operation of attribute 'network' cannot proceed
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/ec2/__init__.py", line 348, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/ec2/apirequest.py", line 78, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/ec2/cloud.py", line 1397, in run_instances
(nova.api): TRACE: reservation_id=instances[0]['reservation_id'])
(nova.api): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/ec2/cloud.py", line 1160, in _format_run_instances
(nova.api): TRACE: i = self._format_instances(context, reservation_id=reservation_id)
(nova.api): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/ec2/cloud.py", line 1259, in _format_instances
(nova.api): TRACE: if fixed['network'] and use_v6:
(nova.api): TRACE: File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/models.py", line 76, in __getitem__
(nova.api): TRACE: return getattr(self, key)
(nova.api): TRACE: File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/attributes.py", line 168, in __get__
(nova.api): TRACE: instance_dict(instance))
(nova.api): TRACE: File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/attributes.py", line 388, in get
(nova.api): TRACE: value = callable_(passive=passive)
(nova.api): TRACE: File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/strategies.py", line 599, in __call__
(nova.api): TRACE: (mapperutil.state_str(state), self.key)
(nova.api): TRACE: DetachedInstanceError: Parent instance is not bound to a Session; lazy load operation of attribute 'network' cannot proceed
(nova.api): TRACE:

This appears periodically when spawning systems. Once this bug arises it affects all ec2 api calls until the instance it was trying to spawn is terminated.