-
Notifications
You must be signed in to change notification settings - Fork 12
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
ovn-tester: Group multiple ctl commands into transactions #86
Comments
While I agree that this might be easier to implement than other approaches, probably the most realistic test would be to not use SSH commands at all and instead use IDL clients connecting to NB/SB/OVSDB on the remote hosts. In the end, it's also the way a real CMS should configure OVN. That being said, if we can easily batch some SSH commands together without complicating the code too much that's fine by me. However, if the effort to do that is significant, it might make more sense to invest time into looking at using the Python OVSDB IDL directly. @putnopvut what do you think? |
I opened this issue with the idea that the unit under test is OVN, rather than the OVSDB client. In other words, the thing that generates the JSON requests for the OVSDB server isn't very important, as long as the content of those JSON requests is in keeping with what a real CMS would send. There are only three reasons I can think of to switch to the python IDL
I think that switching to the python IDL is going to be more difficult than augmenting SSH, especially once the asyncio changes go in. |
Ok, thanks for the follow up. |
We switched to the python IDL (ovsdbapp) since #136. Closing this issue. |
Currently, many of our operations involve repeated calls to ovn-nbctl [1]. These can be and should be combined into single transactions when possible.
First, this is the behavior that CMSes already have. ovn-tester is attempting to emulate a CMS, so ovn-tester shouldn't hamstring itself by issuing so many SSH commands.
Second, when asyncio is used, these repeated ovn-nbctl calls lead to skewed times being reported. The event loop can give control to other tasks between the ovn-nbctl calls. If we are timing the operation that makes those ovn-nbctl calls, then the time will include "idle" time when the event loop was allowing other tasks to run.
Third, fewer SSH calls generally means faster test execution.
The actual mechanics of this are left to the implementer. For now, the easiest method would be to combine the related ovn-nbctl calls into a single SSH invocation.
[1] Also ovn-sbctl and ovs-vsctl, however ovn-nbctl is the most common and what I'll refer to throughout the rest of the issue.
The text was updated successfully, but these errors were encountered: