openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #05905
Re: virt driver interface and exceptions
IIRC it was to ensure that the instance could be deleted from the db even if the virt layer didn't know about it. It seems equally valid to raise an exception and catch it in manager and continue the delete process.
Vish
On Dec 4, 2011, at 7:30 AM, Mark Washenberger wrote:
> Team,
>
> I was poking around in nova/virt/driver.py and found this comment:
>
> def destroy(self, instance, network_info, block_device_info=None,
> cleanup=True):
> """Destroy (shutdown and delete) the specified instance.
>
> If the instance is not found (for example if networking failed), this
> function should still succeed. It's probably a good idea to log a
> warning in that case.
> ...
>
> It looks like maybe this is the only function in the interface that is not supposed to return exceptions.
>
> If anyone recalls the story behind this restriction, could you talk about it a bit? I just want to understand the reasoning behind this choice.
>
> Thanks!
>
> Mark Washenberger
> Rackspace Hosting
> Software Developer
> mark.washenberger@xxxxxxxxxxxxx
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
References