Closed abhat closed 4 years ago
Many UTs are failing on this current patch: https://travis-ci.org/github/eBay/go-ovn/jobs/677990243 . Can you please fix them and amend the patch with correction?
P.S. the test failure may be due to the fact that OVN DBs are initiated with the row in Global table, so you can't add one if it existed. Maybe the API of adding the row in Global table is not quite useful.
Yes, I didn't realize that the OVN DBs are initiate with rows in Global table. That violates the schema constraint of having only one row. Do you know who is adding that row in the Global table? I know a row is added by northd if it doesn't exist.
This commit adds support for creating and deleting NB/SB rows via the go-api as also the ability to set options on the rows. In reality the add/delete rows is only used for unit-testing since ovn-northd is the one that creates the rows during start up in the NB_Global table.
There was also a bug in the way the LSP SetOptions and SetExternalIds api worked. Updating entries in these maps would fail since instead of calling an
opUpdate
on the entire row, these APIs were trying to mutate options/external-ids using individual key-values usingopInsert
. That would have failed unless there is a delete first followed by an insert.