In OpenStack Neutron, we use a fork of ryu library, os-ken. Recently we have backported two patches related to app/ofctl, when the datapath disconnects:
After we set the new OF protocols, the OF controller is restarted. When we try to execute a command, we receive the "unknown dpid" error (a InvalidDatapath exception is thrown) until the new OF controller is registered in "OfctlService._switches".
However, in some cases the OF controller is present and we try to process the message. The message XID should be None, but as you can see in the snippet, the XID has been already set. What I don't know is if this is an old message being processed again and what can we do:
Just skip this assertion, reset message XID and reply.
Raise a InvalidDatapath, discarding this message.
In any case, because of this assertion exception, we never receive a reply and we timeout. I think "OfctlService._handle_send_msg" should handle this possible situation, returning a normal reply or an exception.
Hello:
In OpenStack Neutron, we use a fork of ryu library, os-ken. Recently we have backported two patches related to app/ofctl, when the datapath disconnects:
That solved some issues we had initially when the OF controller is restarting. For example, when we define new OpenFlow protocols.
Error snippet: https://paste.opendev.org/show/810072/
After we set the new OF protocols, the OF controller is restarted. When we try to execute a command, we receive the "unknown dpid" error (a InvalidDatapath exception is thrown) until the new OF controller is registered in "OfctlService._switches".
However, in some cases the OF controller is present and we try to process the message. The message XID should be None, but as you can see in the snippet, the XID has been already set. What I don't know is if this is an old message being processed again and what can we do:
In any case, because of this assertion exception, we never receive a reply and we timeout. I think "OfctlService._handle_send_msg" should handle this possible situation, returning a normal reply or an exception.
Regards.