
Currently our refresh method is not working as it should as it has mainly 3 problems: - It doesn't support read_only fields - It may trigger lazy loads - It will not respect version-fields relationships The read_only issue is triggered when we do a refresh from the DB and the field has changed. This could be the case of a metadata field that is loaded by `get_by_id` but it is not allowed to be modified directly in the OVO: oslo_versionedobjects.exception.ReadOnlyFieldError: Cannot modify readonly field name The triggering of lazy loads would occur if we have an OVO that has an optional field set and we do a refresh. This refresh would trigger the lazy load of that field. A case where the old refresh would not respect version-fields relationships is for example when you receive in a node with volume v1.1 and CG v1.1 a volume v1.0 that has CG v1.0, then you do a refresh and you end up with a volume with v1.0 and CG v1.1. And this gets even worse if any of your fields changed the stored contents on a field and relied on backporting to do the right mapping, as now we'll have the old OVO version with the new OVO contents. This patch refactors refresh method in a way that fixes the first 2 problems as it has been deemed that proposed solution for the third issue would add too much complexity and it's more likely unnecessary. Closes-Bug: #1599502 Change-Id: Ibcb0f841d92ab7f96c076fba4569c56734e91ffd
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: http://wiki.openstack.org/Cinder
- Developer docs: http://docs.openstack.org/developer/cinder
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 http://bugs.launchpad.net/cinder
Python client
https://git.openstack.org/cgit/openstack/python-cinderclient
Description
Languages
Python
99.7%
Smarty
0.3%