Use different IP addresses for the out-of-the-box "virtualbox" variants #86
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.
Dear Stefan,
coming from pyveci/racker#4, we are aiming to run the "out-of-the-box" boxes
2016-box,2019-boxand2022-boxin parallel without getting any conflicts between them.Problem
Currently, when first using the
2016-boxand then switching to the2019-box, which has been provisioned beforehand already, it croaks because the association with respect to the appropriate Docker context vs. generated TLS certificates goes south.We have been able to produce different flavors of the same broken situation, here are two examples how this turns out in practice:
Workaround
A workaround-like solution is to manually remove the Docker context (
docker context remove 2019-box) and run the box provisioning again (vagrant provision 2019-box). With both invocations, the TLS certificates will get re-generated and the corresponding Docker context will get re-established correctly.Solution
The workaround outlined above quickly becomes tedious when aiming to switch back and forth between boxes or even impossible when aiming to run them in parallel.
So, with this patch, each of the "virtualbox"-type VM definitions gets a different IP address which makes the problem go away completely.
If you think the patch should be adjusted in any way, we are happy to receive any kind of guidance. Specifically, we didn't check how the patch would behave on other Vagrant provider backends than VirtualBox.
With kind regards,
Andreas.