The cinder.volume.flows.manager.manage_existing_snapshot
Module¶
-
class
CreateSnapshotOnFinishTask
(db, event_suffix, host)¶ Bases:
cinder.volume.flows.manager.manage_existing_snapshot.NotifySnapshotActionTask
Perform final snapshot actions.
When a snapshot is created successfully it is expected that MQ notifications and database updates will occur to ‘signal’ to others that the snapshot is now ready for usage. This task does those notifications and updates in a reliable manner (not re-raising exceptions if said actions can not be triggered).
Reversion strategy: N/A
-
execute
(context, snapshot, new_status)¶
-
-
class
ExtractSnapshotRefTask
(db)¶ Bases:
cinder.flow_utils.CinderTask
Extracts snapshot reference for given snapshot id.
-
default_provides
= 'snapshot_ref'¶
-
execute
(context, snapshot_id)¶
-
revert
(context, snapshot_id, result, **kwargs)¶
-
-
class
ManageExistingTask
(db, driver)¶ Bases:
cinder.flow_utils.CinderTask
Brings an existing snapshot under Cinder management.
-
default_provides
= set(['snapshot', 'new_status'])¶
-
execute
(context, snapshot_ref, manage_existing_ref, size)¶
-
-
class
NotifySnapshotActionTask
(db, event_suffix, host)¶ Bases:
cinder.flow_utils.CinderTask
Performs a notification about the given snapshot when called.
Reversion strategy: N/A
-
execute
(context, snapshot_ref)¶
-
-
class
PrepareForQuotaReservationTask
(db, driver)¶ Bases:
cinder.flow_utils.CinderTask
Gets the snapshot size from the driver.
-
default_provides
= set(['snapshot_properties', 'size'])¶
-
execute
(context, snapshot_ref, manage_existing_ref)¶
-
-
class
QuotaCommitTask
¶ Bases:
cinder.flow_utils.CinderTask
Commits the reservation.
Reversion strategy: N/A (the rollback will be handled by the task that did the initial reservation (see: QuotaReserveTask).
Warning Warning: if the process that is running this reserve and commit process fails (or is killed before the quota is rolled back or committed it does appear like the quota will never be rolled back). This makes software upgrades hard (inflight operations will need to be stopped or allowed to complete before the upgrade can occur). In the future when taskflow has persistence built-in this should be easier to correct via an automated or manual process.
-
execute
(context, reservations, snapshot_properties, optional_args)¶
-
revert
(context, result, **kwargs)¶
-
-
class
QuotaReserveTask
¶ Bases:
cinder.flow_utils.CinderTask
Reserves a single snapshot with the given size.
Reversion strategy: rollback the quota reservation.
Warning Warning: if the process that is running this reserve and commit process fails (or is killed before the quota is rolled back or committed it does appear like the quota will never be rolled back). This makes software upgrades hard (inflight operations will need to be stopped or allowed to complete before the upgrade can occur). In the future when taskflow has persistence built-in this should be easier to correct via an automated or manual process.
-
default_provides
= set(['reservations'])¶
-
execute
(context, size, optional_args)¶
-
revert
(context, result, optional_args, **kwargs)¶
-
-
get_flow
(context, db, driver, host, snapshot_id, ref)¶ Constructs and returns the manager entry point flow.