Comment 7 for bug 1586731

Revision history for this message
Brian Haley (brian-haley) wrote :

Thanks for the patch, here's some more info I found.

So I think the trunk, and maybe subport, fanout queue is due to this code in ovs_neutron_agent.py:

def main(bridge_classes):
    ovs_capabilities.register()
    ...

That call will trigger a call to (I think) neutron/services/trunk/drivers/openvswitch/agent/driver.py:init_handler() with registers the trunk "skeleton". Eventually this code in the trunk agent.py:__init__: code gets invoked:

        self._connection = n_rpc.Connection()
        endpoints = [resources_rpc.ResourcesPushRpcCallback()]
        topic = resources_rpc.resource_type_versioned_topic(resources.SUBPORT)
        self._connection.create_consumer(topic, endpoints, fanout=True)
        topic = resources_rpc.resource_type_versioned_topic(resources.TRUNK)
        self._connection.create_consumer(topic, endpoints, fanout=True)
        self._connection.consume_in_threads()

At the end of main() in the agent, there is no 'unregister' call, in fact there is no unregister code that I could find.

The goal would be to eventually call neutron_lib.rpc.py:Connection.close(), basically undoing what the init() did above.

Does that make sense? It did when I looked closer.