[device map] fix device map creation issue and caching issue #2978
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
Type of change
Approach
What is the motivation for this PR?
lag_2 was failing on dualtor testbed with 3 tests. 3 particular lag always fail. Investigation shows that the cached ptf port map was not right.
How did you do it?
Device map creation could be aborted in the middle and leave map half updated if an extra interface was not defined in the
topology but show up in the minigraph.
And because we cache the host variables on the file system, the cache could prevent a correct map being generated.
Add a new pretest to remove cache. It would still be good to generate cache for each nightly test.
Remove cache removal from kvmtest.sh to leave it for pretest.
Signed-off-by: Ying Xie [email protected]
How did you verify/test it?
Verified that the new pretest will remove _cache if exists.
Verified that newly generated port map for dualtor testbed is correct.
lag_2 passes with the change.