manila/manila/api
Goutham Pacha Ravi 94e04c8de2 Data Replication: Ensure Snapshots across replicas
When taking a snapshot of a replicated share,  users would
expect the snapshot to be available across the replicas.
Currently, Manila assumes that drivers will take snapshots
along with the share data.

Different backends implement replication differently. Many
of them assume that replicas are 'in_sync' with the primary
if they have been synchronized within a particular window
of time (sometimes referred to as 'recovery point objective').
Since snapshots are point in time actions on a share, drivers
must ensure that the replication of a snapshot begins as soon
as it is available on the primary/'active' instance.

To ensure that snapshots are indeed available across replicas:
1) Track snapshots across replicas as different
    snapshot instances.
2) Make an 'aggregate_status' property to convey the
    availability of a snapshot across all the active/in_sync
    replicas of a share.
3) Provide all the information necessary for drivers to:
    - Create a snapshot on the primary and send it across
       to all replicas
    - Delete a snapshot on the primary and ensure that it is
       deleted on the replicas as well.
4) Set snapshot instance to 'error' if it was in any transitional
    state when its replica was 'promoted' to become an 'active'
    instance.
5) Pass down snapshot instances during create, delete and update
replica driver calls.
6) Update replica interfaces to pass in snapshot instance data. Always
include 'available' snapshots in the update_replica call to ensure
that drivers confirm their presence on the replica in order to report
that the replica is 'in_sync'.

Also, grab the share_type afresh from parent share/snapshot
to allow 'replication_key' to be copied to the share model during
share creation.

Rename SnapshotNotFound to SnapshotResourceNotFound to
signify a missing snapshot object on backends.

APIImpact
The 'status' attribute of the snapshot is now the 'aggregate_status'
of the instances of the snapshot. No key changes have been made
in the JSON response. However, API actions will be gated against
'aggregate_status' of the snapshot instances when more than one
instance exists.

Closes-Bug: #1546303
Closes-Bug: #1551064

Change-Id: I63203df00904d209e9e92eda7c79206e5ef8d611
2016-03-18 20:29:11 -04:00
..
contrib Port share type extensions to core API 2015-11-12 14:58:20 +00:00
middleware Replace deprecated [logger/LOG].warn with warning 2016-01-08 10:32:47 +08:00
openstack Move Share Migration code to Data Service 2016-03-03 09:34:29 -03:00
v1 Data Replication: Ensure Snapshots across replicas 2016-03-18 20:29:11 -04:00
v2 Move Share Migration code to Data Service 2016-03-03 09:34:29 -03:00
views Data Replication: Ensure Snapshots across replicas 2016-03-18 20:29:11 -04:00
__init__.py Implement Manila REST API microversions 2015-08-13 19:51:19 +00:00
auth.py Replace deprecated [logger/LOG].warn with warning 2016-01-08 10:32:47 +08:00
common.py Using dict.items() is better than six.iteritems(dict) 2016-01-19 22:22:48 +08:00
extensions.py Using dict.items() is better than six.iteritems(dict) 2016-01-19 22:22:48 +08:00
sizelimit.py Replace deprecated [logger/LOG].warn with warning 2016-01-08 10:32:47 +08:00
urlmap.py Trivial: Remove unused logging import 2015-12-28 21:44:26 -05:00
versions.py Add v2 Manila API path as base for microversions 2015-09-10 13:58:26 +00:00