[openstack-dev] [nova] nova hooks - document & test or deprecate?
dms at danplanet.com
Mon Feb 29 18:18:29 UTC 2016
> Forgive my ignorance or for playing devil's advocate, but wouldn't the
> main difference between notifications and hooks be that notifications
> are asynchronous and hooks aren't?
The main difference is that notifications are external and intended to
be stable (especially with the versioned notifications effort). The
hooks are internal and depend wholly on internal data structures.
> In the case of how Rdo was using it,
> they are adding things to the injected_files list before the instance is
> created in the compute API. You couldn't do that with notifications as
> far as I know.
Nope, definitely not, but I see that as a good thing. Injecting files
like that is likely to be very fragile and I think mostly regarded as
substantially less desirable than the alternatives, regardless of how it
I think that Laski's point was that the most useful and least dangerous
thing that hooks can be used for is the use case that is much better
served by notifications.
So, if file injection (and any other internals-mangling that other
people may use them for) is not a reason to keep hooks, and if
notifications are the proper way to trigger on things happening, then
there's no reason to keep hooks.
More information about the OpenStack-dev