Open jlausuch opened 5 years ago
This can be solved by hard-coding bridge names bridge = "my-bridge-1"
and bridge = "my-bridge-2"
in the network resources. I guess the expected behavior is that he framework calculates the bridge names automatically, and no need to specify it manually... So, I keep this issue open.
There is a race condition between multiple network resources. Another workaround is to use depends_on between resources. I believe the issue is with the code looking up next available bridge name, and multiple resources fetch the same bridge name in parallel.
Is there any proffered method to implement the locking mechanism? I can spend some time to try to fix this, but don't want to waste my time if there is already a standard way of implementing locking for providers?
Trying to create a environment with 2 Networks, 2 VMs with 2 NICs each connected to the respective networks. This same environment, but with only 1 network doesn't give any problem.
System Information
Linux distribution
opensuse Leap 15.0
Terraform version
Provider and libvirt versions
If that gives you "was not built correctly", get the Git commit hash from your local provider repository:
Checklist
[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[X] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Setup
Steps to Reproduce Issue