-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test, jenkinsfile: Clean up natnetworks in CI after test run
We currently have a flake in CI that is caused by some incorrect VirtualBox natnetwork configuration. It is currently unclear why the natnetworks are sometimes created with an incorrect configuration. Unfortunately, because we don't delete natnetworks at the end of each CI job, those incorrect natnetworks remains for subsequent runs and the tests end up failing with the same flake on every single CI job executed on that node. This commit adds a cleanup step for natnetworks in our CI. We still won't run natnetworks when running tests locally, for the same reason we don't clean up VMs. This change doesn't fix the flake but it should limit its impact to a single CI job instead of all jobs running on a node. Signed-off-by: Paul Chaignon <paul@cilium.io>
- Loading branch information
Showing
3 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
K8S_NODES="${K8S_NODES:-2}" | ||
|
||
vagrant destroy -f | ||
|
||
i=1 | ||
while [ "$i" -le "$K8S_NODES" ]; do | ||
VBoxManage natnetwork remove --netname natnet$i | ||
i=$((i+1)) | ||
done | ||
|
||
VBoxManage natnetwork list |