if (volumeCreated) {
try {
deleteRogueVolume(volName, s);//deletes created volume on filer
} catch (NaException e) {
s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
throw new ServerException("Unable to create volume via cloudtools."
+ "Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
} catch (IOException e) {
s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
throw new ServerException("Unable to create volume via cloudtools."
+ "Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
}
}
throw new ServerException("Unable to create volume", nae);
} catch (IOException ioe) {
s_logger.warn("Failed to create volume on the netapp filer:", ioe);
txn.rollback();
if (volumeCreated) {
try {
deleteRogueVolume(volName, s);//deletes created volume on filer
} catch (NaException e) {
s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
throw new ServerException("Unable to create volume via cloudtools."
+ "Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
} catch (IOException e) {
s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
throw new ServerException("Unable to create volume via cloudtools."
+ "Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
}
}
throw new ServerException("Unable to create volume", ioe);
} finally {
if (s != null)
s.close();
if (pool != null)
_poolDao.releaseFromLockTable(pool.getId());