b0f6384751
In some cases, when loading a list of volumes using
cinder.objects.VolumeList.get_all we may end up with a SQL alchemy error
like this one:
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance
<VolumeAttachment at 0x7f048ff22290> is not bound to a Session; lazy
load operation of attribute 'volume' cannot proceed (Background on this
error at: http://sqlalche.me/e/bhk3)
This happens because when loading a Cinder Volume we also load the
volume attachments, so the Volume OVO tries to create the
VolumeAttachmentList OVO, which in turn creates the individual
VolumeAttachment OVOs, but these have the volume field set in
expected_attrs, but in this case the volume data is not loaded.
In most cases we don't see this issue because the session is still
available and SQLAlchemy will return this information.
Instead of using the dictionary "get" method that will do the lazy
loading we use the hasattr method that will return False if the lazy
loading exception happens when trying to get the volume.
Depends-On: I9f0fec25444ed865d56d0d250fb6d840ab5b4095
Closes-Bug: #1812913
Change-Id: I253123d5451b32f0e3143916e41aaa1af75561c2
(cherry picked from commit
|
||
---|---|---|
api-ref/source | ||
cinder | ||
contrib/block-box | ||
doc | ||
etc/cinder | ||
playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican | ||
rally-jobs | ||
releasenotes | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.stestr.conf | ||
.zuul.yaml | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
babel.cfg | ||
bindep.txt | ||
driver-requirements.txt | ||
pylintrc | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Team and repository tags
CINDER
You have come across a storage service for an open cloud computing service. It has identified itself as Cinder. It was abstracted from the Nova project.
- Wiki: https://wiki.openstack.org/Cinder
- Developer docs: https://docs.openstack.org/cinder/latest/
Getting Started
If you'd like to run from the master branch, you can clone the git repo:
For developer information please see HACKING.rst
You can raise bugs here https://bugs.launchpad.net/cinder
Python client
https://git.openstack.org/cgit/openstack/python-cinderclient