...
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
...
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 trafficge trafficgen pod can reserve/release the ports multiple times.
...