94e04c8de2
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 |
||
---|---|---|
.. | ||
contrib | ||
middleware | ||
openstack | ||
v1 | ||
v2 | ||
views | ||
__init__.py | ||
auth.py | ||
common.py | ||
extensions.py | ||
sizelimit.py | ||
urlmap.py | ||
versions.py |