Scope Vagrant libvirt domains to allow multiple checkouts#494
Open
ehelms wants to merge 1 commit into
Open
Conversation
f74dc9f to
51a8bdd
Compare
ekohl
reviewed
May 14, 2026
2 tasks
Member
|
Thanks for merging #305. Needs a rebase now. |
51a8bdd to
29075ee
Compare
ekohl
reviewed
May 19, 2026
29075ee to
068523f
Compare
ekohl
reviewed
May 19, 2026
068523f to
2418c95
Compare
Use a hash of the absolute working directory path to generate a unique libvirt domain prefix per checkout, preventing collisions when multiple clones or git worktrees deploy Vagrant boxes simultaneously. Both the libvirt domain name prefix and the VM hostnames are scoped using the prefix, ensuring full isolation between deployments. Resolve VM FQDNs dynamically in CI and test fixtures instead of hardcoding the .example.com domain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2418c95 to
d41999e
Compare
ekohl
reviewed
May 20, 2026
Member
ekohl
left a comment
There was a problem hiding this comment.
When we merge this, will it break existing checkouts users may have? Should the prefix be opt-in?
|
|
||
| config.vm.provider "libvirt" do |libvirt| | ||
| libvirt.management_network_domain = DOMAIN | ||
| libvirt.default_prefix = prefix |
Member
There was a problem hiding this comment.
Is it good to keep the foremanctl prefix so they're still grouped?
Suggested change
| libvirt.default_prefix = prefix | |
| libvirt.default_prefix = "foremanctl_#{prefix}" |
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.
Why are you introducing these changes? (Problem description, related links)
I sometimes have 2-3 different directories working at the same time, this change will prevent clashes in those environments.
What are the changes introduced in this pull request?
Use a hash of the absolute working directory path to generate a unique libvirt domain prefix per checkout, preventing collisions when multiple clones or git worktrees deploy Vagrant boxes simultaneously.
Both the libvirt domain name prefix and the VM hostnames are scoped using the prefix, ensuring full isolation between deployments.
How to test this pull request
Steps to reproduce:
./forge vms startvagrant ssh quadlethostnameCheck that the hostname is not
quadlet.example.comChecklist