Temp workaround to debug southbound IT
authorSam Hague <shague@redhat.com>
Tue, 13 Oct 2015 00:50:25 +0000 (20:50 -0400)
committerSam Hague <shague@redhat.com>
Tue, 13 Oct 2015 00:50:25 +0000 (20:50 -0400)
It is a timing change from the clustering code not taking into account some crazy existing code.

This patch has a workaround that works in my local tests. I will merge it temporarily to see if the jenkins builds are good.

Will work with Anil and Flavio on a long term solution.

Old code:

write ovsdb node to config ->
-> dcl ->
-> connect -> connect -> connectedButCallbacksNotRegistered -> putConnectionInstance
-> updateData -> OvsdbNodeUpdateCommand - > ovsdb node - set Open_vSwitch external_ids
*** key here is that the putConnectionInstance happened earlier in connect so now the OvsdbNodeUpdateCommand gets a chance to run and write the externalIds to the Open_vSwitch table
...
OvsdbMonitorCallback -> OpenVSwitchUpdateCommand - > writes node to operational
*** key here is that the iid (nodePath) is found by looking for the externalIds. If found, since it was written earlier, then it is used, if not the backup of using the uuid of the node is used. The IT expects the externalIds value to be there and that is the one with the form ip:port.

In the new code:
- putConnectionInstance() does not happen until the handleOwnership completes - too late since the updateData is processed before that
- updateData doesn't do anything, complains about not finding client since the connectionInstance was not written earlier, therefore the externalIds are not written
- OpenVSwitchUpdateCommand ends up using the wrong iid of the form using the uuid since the externalIds were not written.

Change-Id: Iafbb8c4fa3dd5708f4c4bd3242e27ec72a4b4c6e
Signed-off-by: Sam Hague <shague@redhat.com>

No differences found