Fix race condition in initial connection.
We must register the OvsdbConnectionCreateCommand prior
to registerCallback or we will get race conditions.
*Before* any bridge information can be successfully written
to the operational datastore, the OvsdbNode *must* be written.
The txInvoker guarantees writes occur in the order they were
provided to *it*.
If we have:
txInvoker.invoke(new OvsdbNodeCreateCommand(key, null,null));
registerCallBack();
We can guarantee that, and thus guarantee we will not have race conditions.
However, if we reverse that:
registerCallBack();
txInvoker.invoke(new OvsdbNodeCreateCommand(key, null,null));
We are guarenteed to have race conditions, as the results of the original
monitor dump get written to the datastore before the OvsdbNode gets written.
Please note: ovsdb is actively broken out of the box due to this race
conditions, so this must be corrected ASAP.
Change-Id: Id71221f7665ece5ec4b2eb9a0b39465618bada01
Signed-off-by: Ed Warnicke <hagbard@gmail.com>