[Openstack] virt driver interface and exceptions

Vishvananda Ishaya vishvananda at gmail.com
Mon Dec 5 07:00:03 UTC 2011

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.


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 at rackspace.com
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp

More information about the Openstack mailing list