[controller-dev] Notificatoins over websockets: Making JSON notifications to go just from one node in cluster


Robert Varga <nite@...>
 

On 01/07/2019 19:35, N Vivekanandan wrote:
Hi Team,
Hello,

[+neutron-dev, see below]

Can you please let us know if its possible to provide an enhanced API
from RestConfImpl, where we can request that the
datastore-change-notifications be JSON Wrapped and sent only from one
node of an MD-SAL cluster?

 

For example, the port-status change listener subscribes to send
websocket notifications on all the 3 nodes in our MD-SAL Cluster.
This is the problem: why do you register on all nodes? If you do, you
have three streams and it is *your* responsibility to
synchronize/deduplicate them.

This results in same port-status notifications sent 3 times on every
change in the status of the neutron port in the ODL Controller.

 

We wanted to send just “one port-status notification per status change
on the port” towards the Openstack services from the ODL controller.

 

Can you please let us know if there is a simpler way that we would be
able to send websocket notifications from only one MD-SAL cluster

node towards openstack within the RestConfImpl?

 

We thought of using EOS (EntityOwnershipService), but looks we have to
resubscribe to the stream everytime on the new node which
Got a pointer to a patch?

becomes an EOS leader due to elections in a running cloud, and this
resubscribing to the stream may resend tons of notifications towards

Openstack on a scaled cloud with about 6000 ACTIVE ports.

 

https://github.com/opendaylight/neutron/blob/master/northbound-api/src/main/java/org/opendaylight/neutron/northbound/impl/PortStatusUpdateInitializer.java
... I am not quite getting why neutron is talking to RESTCONF instead of
directly to MD-SAL here. Then, obviously, neutron can use
ClusterDataTreeChangeListener coupled with Cluster Singleton Service to
provide proper subscription service.

Regards,
Robert