[Kimchi-devel] [PATCH 3/5] AsyncTask: Improve continuous status feedback

Crístian Viana vianac at linux.vnet.ibm.com
Tue Oct 28 12:39:58 UTC 2014


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.




More information about the Kimchi-devel mailing list