Disable Landrush DNS Resolver in Parallels #1421
Merged
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.
Issue this fixes
Specific to the following configuration:
Without this change, when provisioning the above this will fail. Due to the attempt of Landrush attempting to being the DNS resolver for guest. For more information: https://discourse.roots.io/t/no-dns-resolution-in-development-vm-vagrant-parallels-multisite-landrush/23170
Specifically Landrush will attempt to change IP Tables and internal DNS on the vagrant machine, upon attempting this communication to services such as APT and any outside connections will fail. This is due to Parallels differing in network adapters created. Parallels by default wlll configure a shared adapter for NAT / DNS resolution. And a secondary adapter for the custom IP we specify. Landrush not knowing that DNS is handled that way will therefore break DNS/NAT.
Credit to this fix is all on @Twansparant
The current addition adds a conditional to Parallels provisioner, however if double nested
if
statements are okay, we could move this up to the block below, and instead check if the current provisioner is Parallels and prefer Landrush config grouping:trellis/Vagrantfile
Lines 60 to 62 in e9e7c37