
28 Oct
2014
28 Oct
'14
2:39 p.m.
On 28-10-2014 04:48, Zhou Zheng Sheng wrote:
- inst.storagevolumes_create(pool, params) + task_id = inst.storagevolumes_create(pool, params)['id'] rollback.prependDefer(inst.storagevolume_delete, pool, vol) + self._wait_task(inst, task_id)
I think you should add the delete call to the rollback session only after the task has finished (i.e. after waiting for it). What if the task raises an exception and the storage volume isn't created? The rollback session will try to delete it but it won't exist.