xen-org/xen-api — pull request #1030 by thomassa (2013-02-19 12:58:05+00:00)
Title: CA-86883: Detach SR if SR.destroy fails

The storage backend can destroy an SR only if it is attached.
Therefore when xapi wants to destroy an SR, first it attaches it.
When the backend destroys the SR it is no longer attached.

This change adds exception handling so that if the backend fails
to destroy the SR, xapi will detach it.