This spec aims to improve the infrastructure used to coordinate between Cinder and Nova for volume snapshots.
The update_snapshot_status API is used to update fields in the Cinder database which the driver performing a snapshot delete uses to determine when Nova’s part is finished and the Cinder driver can take over again.
This currently overloads the ‘progress’ field of the snapshot to carry information from the API layer to the driver. This is hacky and should be reworked as more drivers are interested in supporting assisted snapshots.
This work will also assist in supporting proper transitions between different phases of the snapshot create/delete process.
NA. There is no user/deployer impact as this is a internal only change.
Establish a snapshot_admin_metadata table which is similar to the volume_admin_metadata table:
id : Integer, primary key, key : string, value : string, volume_id : id ref volumes.id, volume : relationship joining to volumes table
Setting a snapshot_status metadata value will allow the API layer to transfer this information to the the volume service.
Split the assisted snapshot processing code out of the driver (currently RemoteFS-based) and into the volume manager. This will allow drivers that support assisted snapshots to have a call for each stage, rather than only a single delete_snapshot call.
The driver will have a property indicating it supports assisted snapshots, which triggers use of the following methods in the manager instead of the manager calling the driver’s create_snapshot:
create_snapshot_assisted_begin(snapshot_ref) create_snapshot_assisted_complete(snapshot_ref) delete_snapshot_assisted_begin(snapshot_ref) delete_snapshot_assisted_complete(snapshot_ref)
Each of these calls can return a dict of fields to be updated for the snapshot and/or snapshot_admin_metadata by the volume manager.
This will move some database accesses currently done in the driver to the volume manager, as well as better allowing support for defined state transitions between the Nova and Cinder phases.
Leave things as they are today, which may lead to a less robust/maintainable infrastructure for assisted snapshots.
Create new snapshot_admin_metadata table as described above.
update_snapshot_status() API will look for a new ‘compute_snapshot_status’ field which will be used to populate the snapshot_admin_metadata entry.
If this field is not present, it will use the ‘progress’ field as before for compatibility.
None, interactions in and out of Cinder expose the same information and level of access as today.
Cinder will remain backward compatible with Liberty Nova for the APIs being modified here.
New interfaces for drivers for creating and deleting snapshots assisted by the compute service.
This will be covered by CI for GlusterFS, the NFS driver (once snapshots are added to it in Mitaka), and CI for other RemoteFS drivers.