Insert prefix to temp netdev to support multiple add-topo tasks run concurrently #2195
Conversation
|
@gord1306 I think you have a great idea here. But I am a bit worried that prefixing the vm set name might cause interface name to exceed 15-char Linux limit. Is there a way to get something unique but short? |
@yxieca , yes, it indeed a problem, I am also thinking about this issue, maybe shorten to a random value by hash. |
Yes. You might be able to use system generated tmp file name for this purpose. The key is to make it random but unique. |
|
retest this please |
|
LGTM |
|
retest this please |
It looks likes the mgmt interface not found in the ptf container. But it's strange, my source doesn't set up the netdev with prefix in the ptf container, only up the netdev without prefix |
It looks like there is a hidden issue in this change. Could you fix it? |
…oncurrently The temp netdev is name as ethX_t in currenty library, if there are multiple add-topo jobs run concurrently, they will operate same netdev and cause error. This patch insert the prefix to temp netdev to avoid the conflict issue. And to extend retry times to reduce the ifconfig -a report not found error due the netdev creatation/removal Signed-off-by: Gord Chen <[email protected]>
I observed the testing log seems not remove topology every time, it means the PTF container may already have the mgmt interface. Therefore, I updated the commit, and add one condition check to ignore if the mgmt interface already exists in the PTF container
The new testing result is passed |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Description of PR
The temp netdev is name as ethX_t in currenty library, if there are multiple
add-topo jobs run concurrently in a host, these tasks will operate same netdev
and cause the error.
This patch inserts the prefix to temp netdev to avoid the conflict issue.
And to extend retry times to reduce the
ifconfig -areport not found error duethe netdev creation/removal
Signed-off-by: Gord Chen [email protected]
Type of change
Approach
What is the motivation for this PR?
To support multiple add-topo tasks be performed concurrently in a host
How did you do it?
How did you verify/test it?
perform multiple add-topo jobs
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation