Use different IP addresses for the out-of-the-box "virtualbox" variants#86
Merged
StefanScherer merged 1 commit intoStefanScherer:mainfrom Jun 22, 2022
Merged
Conversation
It will make it possible to run all the corresponding boxes in parallel without getting any conflicts. - 2016-box: 192.168.59.50 - 2019-box: 192.168.59.51 - 2022-box: 192.168.59.52
amotl
commented
Jun 10, 2022
| v.customize ["modifyvm", :id, "--nested-hw-virt", "on"] | ||
| # Use the recommended paravirtualization interface for windows (hyperv) - requires VirtualBox 6 | ||
| v.customize ["modifyvm", :id, "--paravirtprovider", "hyperv"] | ||
| override.vm.network :private_network, ip: "192.168.59.90", gateway: "192.168.56.1" |
Contributor
Author
There was a problem hiding this comment.
We removed this line over here, because we didn't take the time to validate override order yet, i.e. how the code would behave when it would have been left in place. Do you think our amendments re. "per-box-IP" would still take precedence?
However, it might introduce a regression because all the NON-"out-of-the-box" boxes will now be invoked without this configuration setting.
Please let us know if this detail should be addressed in one way or another beforehand. We see three options:
- Check/verify override order. If the individual assignments take precedence, then this line can be left in place.
- Explicitly assign IP addresses to all of the other machines as well.
- Investigate if there is another, more advanced way of configuring the IP address assignment automatically.
Contributor
Author
6 tasks
StefanScherer
approved these changes
Jun 22, 2022
Owner
StefanScherer
left a comment
There was a problem hiding this comment.
I think it's good for now. Let's merge it. The different IP addresses make sense.
Contributor
Author
|
Thank you very much! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.