There was an issue with the way the ViNeperf python scripts launch the ovs-vswitchd process. With the current code it seem we can only reserve ports once or twice before Trafficgen-pod fails to work. The issue is caused because the ViNeperf process stops reading the file descriptor which the ovs-vswitchd process is using for stdout after around ~30 sec. This causes the ovs-vswitchd stdout buffer to get full and hang any ovs-vswitchd threads which write to stdout.
The reason this happens was because the ovs-vswitchd process is launched using pexpect and a thread is spawned to read the process stdout using the tools.tasks.Process.relinquish() function. The thread which is reading the stdout calls pexpect.pty_spawn.read_nonblocking() with default arguments which by default uses the timeout used for spawn which by default is 30 sec.
https://github.com/opnfv/vswitchperf/blob/master/tools/tasks.py#L394
https://pexpect.readthedocs.io/en/stable/_modules/pexpect/pty_spawn.html#spawn.read_nonblocking
The modification is made to the vineperf/tools/task.py file to call to read_nonblocking to pass timeout=None and it fixed the issue. With this, the trafficgen pod can reserve/release the ports multiple times.
[opnfv@worker vswitchperf]$ git diff tools/tasks.py
diff --git a/tools/tasks.py b/tools/tasks.py
index 4e03f85..06408ab 100644
--- a/tools/tasks.py
+++ b/tools/tasks.py
@@ -391,7 +391,7 @@ class Process(object):
def run(self):
while True:
try:
- self.child.read_nonblocking()
+ self.child.read_nonblocking(timeout=None)
except (pexpect.EOF, pexpect.TIMEOUT):
break
Only OVSDPDK is supported. To support VPP, we need to modify how VPP is deployed. Current VPP deployment is NOT compatible with Userspace CNI.
For this case, ensure the following configuration:
This is WIP - Userspace CNI with ovsdpdk has issues with multiple pods deployment.
Only VPP is used, as OVSDPDK is well-managed by ViNePerf.
Changes to support this scenario needs more explanation:
ViNePerf decides on how switch is managed based on (a) 'deployment-scenario' and (b) VSWITCH type.
In ViNePerf vswitch type can be set in 4 ways:
If, vSwitch is set to 'none', then ViNePerf will treat it as "pkt-forwarding' case and does not deploy any vSwitch, else it creates vswitch based on 'deployment-scenario'. Here, 'deployment-scenario' mainly control what kind of flow and interface configuration should be done on the managed vSwitch.
As this is an external case, we should set the VSWITCH to 'none', which will make ViNePerf to consider it as a 'Packet-Forwarding' scenario. We do not want to use the packet-forwarding option too - hence, a 'Dummy' packet-forwarder (named as DummyFWD) is created. Using vSwitch as 'none' and PKTFWD as DummyFWD, we will ensure the ViNePerf will not bother about vSwitch, and just focuses on Pods and Traffic-management.
For this case, ensure the following configuration:
Just ensure that the the length of these two variables NETWORK_ATTACHMENT_FILEPATH & POD_MANIFEST_FILEPATH is 2.