You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple executions of vagrant with vagrant-libvirt are performed at the or near same time, networks that do not have the :libvirt__always_destroy flag set to false can sometimes be removed by one instance while another was in the middle of creating a new domain that relies on it.
Once an instance has a network interface added that is connected to a network, it will automatically prevent the network definition from being removed. The operations of when vagrant checks to see if a network needs to be created and being attached to the associated domain is not atomic. This allows an opportunity for another instance to remove by accident.
While it might be possible to add a lock around each network create, domain creation, then subsequent network device attachment, it is likely to cause many issues and require combining a great deal of operations that are current separated out into different actions.
Suggested approach:
Add a generic locking mechanism that works for both local and remote interactions as well as across multiple users
Support a vagrant-libvirt XML namespace being added to network definitions
Annotate the networks created by vagrant-libvirt as owned by the plugin and update the teardown to only remove networks managed by vagrant-libvirt
Add locking around network creation
Annotate the network with the list of domains that should be using this network definition, removing any references to domains that no longer exist.
The text was updated successfully, but these errors were encountered:
When multiple executions of vagrant with vagrant-libvirt are performed at the or near same time, networks that do not have the
:libvirt__always_destroy
flag set tofalse
can sometimes be removed by one instance while another was in the middle of creating a new domain that relies on it.Once an instance has a network interface added that is connected to a network, it will automatically prevent the network definition from being removed. The operations of when vagrant checks to see if a network needs to be created and being attached to the associated domain is not atomic. This allows an opportunity for another instance to remove by accident.
While it might be possible to add a lock around each network create, domain creation, then subsequent network device attachment, it is likely to cause many issues and require combining a great deal of operations that are current separated out into different actions.
Suggested approach:
The text was updated successfully, but these errors were encountered: