On 03/16/2017 10:48 PM, Masha Atakova wrote:
Hi everyone,

Is there any up-to-date functionality in nova / neutron which allows to
run some additional code triggered by changes in instance like creating
or deleting an instance?

I see that nova hooks are deprecated as of Nova 13:

https://github.com/openstack/nova/blob/master/nova/hooks.py#L19

While it's hard to find the reason for this deprecation, I also struggle
to find if there's any up-to-date alternative to those hooks.

The hooks were for internal (to Nova) code triggers and made the behaviour of Nova potentially inconsistent between deployments, which limited interoperability.

The way to trigger additional code running on changes to instance state is to listen on the outbound Nova notifications message queue topic.

Listen to the notifications queue topic for instance.create[.start|end] and instance.delete events. You can read more about the notifications queue and how to set up a subscriber here:

http://alesnosek.com/blog/2015/05/25/openstack-nova-notifications-subscriber/

Best,
-jay

_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

Reply via email to