VolumeAttachment is not bound to a Session; lazy load operation of attribute 'volume' cannot proceed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
Gorka Eguileor |
Bug Description
Observing in some gate jobs the following error:
2019-01-18 20:02:24.171363 | ubuntu-xenial |
2019-01-18 20:02:24.171460 | ubuntu-xenial | Captured traceback:
2019-01-18 20:02:24.171555 | ubuntu-xenial | ~~~~~~~~~~~~~~~~~~~
2019-01-18 20:02:24.171689 | ubuntu-xenial | Traceback (most recent call last):
2019-01-18 20:02:24.172291 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.172426 | ubuntu-xenial | connection_
2019-01-18 20:02:24.172648 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.172771 | ubuntu-xenial | for ovo in ovos.objects]
2019-01-18 20:02:24.172946 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.173097 | ubuntu-xenial | LazyVolumeAttr.
2019-01-18 20:02:24.173269 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.173465 | ubuntu-xenial | self._volume = Volume.
2019-01-18 20:02:24.173643 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.173792 | ubuntu-xenial | self._backend = self.volume.backend
2019-01-18 20:02:24.174451 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.174610 | ubuntu-xenial | self._volume = Volume.
2019-01-18 20:02:24.175121 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.175310 | ubuntu-xenial | result = cls.persistence
2019-01-18 20:02:24.175505 | ubuntu-xenial | File "cinderlib/
2019-01-18 20:02:24.175733 | ubuntu-xenial | ovos = cinder_
2019-01-18 20:02:24.175934 | ubuntu-xenial | File "cinder/
2019-01-18 20:02:24.176089 | ubuntu-xenial | volumes, expected_
2019-01-18 20:02:24.176499 | ubuntu-xenial | File "/home/
2019-01-18 20:02:24.176597 | ubuntu-xenial | **extra_args)
2019-01-18 20:02:24.176787 | ubuntu-xenial | File "cinder/
2019-01-18 20:02:24.176931 | ubuntu-xenial | db_volume.
2019-01-18 20:02:24.177334 | ubuntu-xenial | File "/home/
2019-01-18 20:02:24.177434 | ubuntu-xenial | **extra_args)
2019-01-18 20:02:24.177656 | ubuntu-xenial | File "cinder/
2019-01-18 20:02:24.178093 | ubuntu-xenial | db_volume = db_attachment.
2019-01-18 20:02:24.178437 | ubuntu-xenial | File "/home/
2019-01-18 20:02:24.178731 | ubuntu-xenial | return getattr(self, key, default)
2019-01-18 20:02:24.179028 | ubuntu-xenial | File "/home/
2019-01-18 20:02:24.179163 | ubuntu-xenial | return self.impl.
2019-01-18 20:02:24.179450 | ubuntu-xenial | File "/home/
2019-01-18 20:02:24.179556 | ubuntu-xenial | value = self.callable_
2019-01-18 20:02:24.179892 | ubuntu-xenial | File "/home/
2019-01-18 20:02:24.180005 | ubuntu-xenial | % (orm_util.
2019-01-18 20:02:24.180437 | ubuntu-xenial | sqlalchemy.
2019-01-18 20:02:24.180490 | ubuntu-xenial |
This happens because when loading a Cinder Volume we also load the volume attachments, so the Volume OVO tries to create the VolumeAttachmen
In most cases we don't see this issue because the session is still available and SQLAlchemy will return this information.
Changed in cinder: | |
importance: | Undecided → High |
Fix proposed to branch: master /review. openstack. org/632549
Review: https:/