xen-org/xen-api — pull request #1037 by jeromemaloberti (2013-02-21 14:37:00+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.