mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #1349 from GaborApatiNagy/CA-236566
CA-236566: test-hotfix-basic-7 throws error 'VDI is in use by some other operation'
This commit is contained in:
commit
3d9d05b342
@ -164,10 +164,24 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.ErrorFormat("{0} {1}", "Failed to import a virtual disk over HTTP.", ex.Message);
|
||||
if (vdiRef != null)
|
||||
RemoveVDI(Session, vdiRef);
|
||||
throw;
|
||||
log.ErrorFormat("{0} {1}", "Failed to import a virtual disk over HTTP.", ex.Message);
|
||||
|
||||
if (vdiRef != null)
|
||||
{
|
||||
log.DebugFormat("Removing the VDI on a best effort basis.");
|
||||
|
||||
try
|
||||
{
|
||||
RemoveVDI(Session, vdiRef);
|
||||
}
|
||||
catch (Exception removeEx)
|
||||
{
|
||||
//best effort
|
||||
log.Error("Failed to remove the VDI.", removeEx);
|
||||
}
|
||||
}
|
||||
|
||||
throw ex; //after having tried to remove the VDI, the original exception is thrown for the UI
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user