~vishvananda/nova/lp706072

Viewing all changes in revision 592.

  • Committer: Tarmac
  • Author(s): Anthony Young, Vishvananda Ishaya
  • Date: 2011-01-20 01:33:58 UTC
  • mfrom: (577.2.5 nova)
  • Revision ID: tarmac-20110120013358-xfvcg3klcjioj9hv
Added changes to make errors and recovery for volumes more graceful:

* If an error occurs while creating our exporting a volume, volume['status'] is set to 'error,' rather than leaving it in 'creating.'  Similarly, if an error occurs while deleting, volume['status'] is set to 'error_deleting'
* Gracefully handle condition where iscsi export has already been removed, or has never successfully been created, in ISCSIDriver.remove_export
* In ISCSIDriver.ensure_export, gracefully handle situation where an iscsi_target is nil.  This occurs when there is an error creating a volume that prevents the target from being assigned.
* Add nova-manage volume commands: delete and reattach
** delete can be used to delete volumes that are in error state, since users can only delete volumes flagged as 'available'
** reattach can be used after host reboot to reattach volumes 

Note that I didn't implement rollback as the original bug suggested, but this code accomplishes the same objectives IMO by making it more clear when errors occur and providing tools for dealing with certain common error conditions.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: