Gorka Eguileor 7d799090fc Fix CinderPersistentObject.refresh
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
2016-07-20 19:25:19 +02:00
2016-07-20 19:25:19 +02:00
2016-07-01 19:03:26 +05:30
2012-05-03 10:48:26 -07:00
2012-05-03 10:48:26 -07:00
2016-07-01 15:08:43 +05:30
2012-05-03 10:48:26 -07:00
2015-06-11 17:19:19 +02:00
2016-03-02 14:33:25 -05:00
2015-09-18 16:37:17 +00:00
2016-07-12 18:00:40 -04:00

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.

Getting Started

If you'd like to run from the master branch, you can clone the git repo:

git clone https://git.openstack.org/openstack/cinder.git

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
OpenStack Block Storage (Cinder)
Readme 914 MiB
Languages
Python 99.7%
Smarty 0.3%