-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix The Server Impl so OVN-K CI can pass #238
Conversation
This fixes a couple of bugs with the Populate2/Update2 handling Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
There are issues when list_dbs fails due to context deadline exceeded and for some reason the `defer` doesn't properly clean up the rpcClient. This isn't the best fix, but it does solve the problem for now. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
f3904c7
to
f4b7669
Compare
This ensures that the cache is locked when calling Populate/Populate2 and expands the model used to represent the OVS table such that we don't have issues caused by Monitors attempting to update unmapped fields. In future, we should probably change the Monitor code to only ask for ORM mapped fields. Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
f4b7669
to
930e336
Compare
Pull Request Test Coverage Report for Build 1320580526
💛 - Coveralls |
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
96fd16a
to
ceaf12d
Compare
} | ||
} | ||
default: | ||
panic("ARGH!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be something more descriptive? Like "libovsdb: Invalid type detected during merge?
} | ||
|
||
func insertToSlice(a, b reflect.Value) reflect.Value { | ||
func insertToSlice(a, b reflect.Value) (reflect.Value, bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice on some of these functions to have doc text on them. a is the slice, b is the value to attempt to insert into the slice if it doesn't already exist in a. Returns true if b was added to a.
@@ -58,74 +57,121 @@ func mutate(current interface{}, mutator ovsdb.Mutator, value interface{}) (inte | |||
return current, value | |||
} | |||
|
|||
func mutateInsert(current, value interface{}) interface{} { | |||
func mutateInsert(current, value interface{}) (interface{}, interface{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same some doctext on this function
Signed-off-by: Dave Tucker dave@dtucker.co.uk