[openstack-dev] [Nova] adding hooks
Brian Elliott
bdelliott at gmail.com
Tue Nov 20 16:32:03 UTC 2012
Sandy,
I wouldn't describe it as 'nesting' per se, but the current code does allow for running several Hook 'callbacks' per named hook. As far as exceptions go, I would like to treat hooks as a you-break-it-you-bought-it type function and if the hook raises an exception just let it pass through. I don't want to limit the potential use cases for hooks and I feel like squashing every exception raised from a hook might be too opinionated.
Thanks,
Brian
On Nov 20, 2012, at 10:11 AM, Sandy Walsh <sandy.walsh at RACKSPACE.COM> wrote:
> My concern would be how exceptions are handled through hooks? If I have nested hooks should I pass them through or die silently. Decorators are bad in this regard and have already caused headaches in notifications.
>
> -S
> ________________________________________
> From: Daniel P. Berrange [berrange at redhat.com]
> Sent: Tuesday, November 20, 2012 11:57 AM
> To: OpenStack Development Mailing List
> Subject: Re: [openstack-dev] [Nova] adding hooks
>
> On Tue, Nov 20, 2012 at 10:40:58AM -0500, Russell Bryant wrote:
>> Greetings,
>>
>> There is currently a patch in the review queue for nova that adds hooks.
>>
>> https://review.openstack.org/#/c/16336/
>>
>> I like the concept, but I think it could benefit from some design
>> discussion. That's difficult on gerrit and much better suited for the
>> mailing list, so here we are.
>
> My thoughts are
>
> - What is the intended usage of the hooks?
> - What is the usage relationship between hooks & extensions ?
> - What are they expected to be allowed to do / not do ?
> - What guarantees are provided wrt hooks continuing to
> work minor, and major updates ?
> - What internal APIs (if any) should hooks be allowed to
> use ?
> - Is there any way to enforce any rules we make above ?
>
> My overriding desire is that we want to avoid sleep-walking into
> a situation where people write all sorts of hooks; these rely
> on internal code we consider unstable; we're then forced to maintain
> stabilty of internal APIs across major and/or minor updates to avoid
> breaking people's hooks.
>
>
> Daniel
> --
> |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org :|
> |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
More information about the OpenStack-dev
mailing list