Use Neutron's push notification for state
When we create network resources in OpenStack we currently go into polling mode until the ports go active. It is worthy to investigate the gains we'd get (and the decreased load on the Neutron server) by using OpenStack oslo_messaging push notifications.
Blueprint information
- Status:
- Not started
- Approver:
- Antoni Segura Puimedon
- Priority:
- Undefined
- Drafter:
- Antoni Segura Puimedon
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Here you can see an example of connecting to the stream using Kombu (what oslo_messaging uses in the background when the transport is amqp:
https:/
Here there's a related example of consuming the events with oslo messaging: https:/
Of course there's several questions raised:
- Do we want to have the controller connect to rabbitmq? Do we want to simplify the controller so that the port active events are watched instead by the CNI Daemon and have the Daemon set the ports active itself?
- Do we want instead to try to make a Neutron http stream agent that then we can use with the current watch facility?
Addressed by: https:/
Use neutron rpc for port status checking
Addressed by: https:/
Disable N530 PEP8 warning
Gerrit topic: https:/
-------
Pitfalls or why this approach can't be used out of the box.
I tested oslo_messaging_
On both of it I can receive messages which neutron server sends.
oslo.
oslo.
The status of the port in payload is DOWN in any cases, and oslo.messaging.
So I didn't find any events which can help to distinguish port status changing to ACTIVE.
I tried to figure out by code /usr/lib/
REMARKS this file contains two type of notification
it's notification which working through default rabbitmq, patch for that was proposed by Ilya. But it was concern.
It's what we need, it works through [oslo_messaging
I tested it on OpenStack with nova-compute, in case of nova-instance
oslo.
As a result we can't handle port status changes this way right now
As an approach of solving it, we can add port update notification call to the neutron openvswitch agent.
Looks like /usr/lib/