Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant: Don't recreate natnetworks #19523

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

pchaigno
Copy link
Member

@pchaigno pchaigno commented Apr 21, 2022

We are hitting issues with the natnetwork creations, both in CI and in the dev. VM setup. In both cases, it fails to create because the natnetwork apparently already exists. For the dev. VM, that happens because the removal of natnetworks sometimes fail, maybe because it's still in use while being removed. For the CI, it's unclear why it fails as a previous listing of natnetworks shows nothing.

In any case, one way to work around this is to avoid recreating the natnetworks each time the VMs are booted. Instead, we can create only the natnetworks we need and delete the rest. If the creations fail, we assume it's because they already exist and ignore the failure.

To be able to ignore the creation failures, we must move them outside of the Vagrant interface configuration and into a proper Shell script, which we run in a pre-provisioning step.

We are hitting issues with the natnetwork creations, both in CI and in
the dev. VM setup. In both cases, it fails to create because the
natnetwork apparently already exists. For the dev. VM, that happens
because the removal of natnetworks sometimes fail, maybe because it's
still in use while being removed. For the CI, it's unclear why it fails
as a previous listing of natnetworks shows nothing.

In any case, one way to work around this is to avoid recreating the
natnetworks each time the VMs are booted. Instead, we can create only
the natnetworks we need and delete the rest. If the creations fail, we
assume it's because they already exist and ignore the failure.

To be able to ignore the creation failures, we must move them outside of
the Vagrant interface configuration and into a proper Shell script,
which we run in a pre-provisioning step.

Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno added kind/bug/CI This is a bug in the testing code. area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Apr 21, 2022
@pchaigno pchaigno requested review from a team as code owners April 21, 2022 20:06
@pchaigno
Copy link
Member Author

/test-vagrant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake kind/bug/CI This is a bug in the testing code. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants