https://blueprints.launchpad.net/dragonflow/+spec/pub-sub-v2
This spec is to refactor the pub-sub mechanism to implement publisher in df-local-controller.
Currently pub/sub mechanism doesn’t work in the following scenario:
When enabling port-status driver or automatic port detection for allow-address-pair, the zeromq pub/sub driver doesn’t work. Because these two applications require the df-local-controller run publishers. It brings socket bind conflicts when running two publishers on the same host (one is df-local-controller, the other is df-publisher-service).
If you deploy with redis driver, everything will be well. Because redis-based pub/sub mechanism doesn’t require socket binding.
This bug is dedicated to zeromq based driver and was reported earlier [1].
Moreover this superficial problem will lead to the rest of the mess.
The fix of this bug is simple, but it is also a good chance to revisit pub/sub mechanism.
One of the solution for this bug is to try to enable multiproc publisher in df-local-controller when it runs with df-publisher-service. As a result, both neutron-server and df-local-controller will publish events via ipc to df-publisher-service and let it distribute event to where the subscriber locates. It is the fast path but it still hides the potential problems.
In order to achieve this, you need to refactor df-publisher-service and the multiproc logic. It will greatly introduce complexity in this service. Moreover, these work won’t help make it better, just focusing on this dedicated bug. According to the original design, the df-publisher-service is working with neutron-server and help re-distribute its messages to local controllers. Let’s keep it.
The other solution for this bug is to try to refactor the pub/sub to fix all the issues discussed above one by one. I’d like to provide a more flexible way to define publisher while maintaining the current df-publisher-service logic.
[neutron] publisher_port = 8866 publisher_binding_address = * pub_sub_use_multiproc = True/False publisher_multiproc_socket = …
[controller] publisher_port = 8867 publisher_binding_address = * pub_sub_use_multiproc = True/False publisher_multiproc_socket = …
Add constants for role definition, ROLE_NEUTRON_SERVER and ROLE_DF_LOCAL_CONTROLLER.
Pass one of the role constant when initializing api_nb and remove the is_neutron_server_flag.
Check each role and apply different options according to the above section:
read pub/sub options from [neutron-server] section
read pub/sub options from [df_local_controller] section
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.