Skip to content
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

Closed
putnopvut opened this issue Oct 1, 2021 · 4 comments
Closed

ovn-tester: Group multiple ctl commands into transactions #86

putnopvut opened this issue Oct 1, 2021 · 4 comments

Comments

@putnopvut
Copy link
Collaborator

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.

@dceara
Copy link
Collaborator

dceara commented Oct 4, 2021

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?

@putnopvut
Copy link
Collaborator Author

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

  1. If the importance of the python IDL client starts to increase, then we may decide that it is important to specifically test the performance of the python IDL client.
  2. It eliminates the overhead of an SSH connection and removes a dependency from ovn-tester.
  3. It gives us the opportunity to exercise more stream types with OVSDB.

I think that switching to the python IDL is going to be more difficult than augmenting SSH, especially once the asyncio changes go in.

@dceara
Copy link
Collaborator

dceara commented Oct 6, 2021

Ok, thanks for the follow up.

@dceara
Copy link
Collaborator

dceara commented Mar 15, 2023

We switched to the python IDL (ovsdbapp) since #136. Closing this issue.

@dceara dceara closed this as completed Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants