Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Fix concurrent VM creation due to busy device error #712

Merged
merged 1 commit into from
Oct 12, 2020

Conversation

darkowlzz
Copy link
Contributor

@darkowlzz darkowlzz commented Oct 12, 2020

Add another lock in DeactivateSnapshot().
Move DeactivateSnapshot from pkg/dmlegacy/cleanup to pkg/dmlegacy to
avoid cyclic dependency.

TODO: Add an e2e test.

Fixes: #711

Copy link
Member

@chanwit chanwit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @darkowlzz

@darkowlzz darkowlzz force-pushed the concurrent-vm-creation branch from ea7460b to cd1d2e3 Compare October 12, 2020 16:02
Add another lock in DeactivateSnapshot().
Move DeactivateSnapshot from pkg/dmlegacy/cleanup to pkg/dmlegacy to
avoid cyclic dependency.
@darkowlzz darkowlzz force-pushed the concurrent-vm-creation branch from cd1d2e3 to 63cd55c Compare October 12, 2020 16:06
@stealthybox
Copy link
Contributor

lgtm pending tests

@stealthybox
Copy link
Contributor

We were able to create some hard-to-reproduce / transient lock failures on @darkowlzz's DigitalOcean dev machine.

I was not able to create any lockfile issues after testing ~100 vm's in small and medium sized concurrent batches on my WSL2 laptop.

This seems to be working about as stable as it did before 👍
e2e test coming next week using cmd.Start and cmd.Wait in two loops.

@stealthybox stealthybox merged commit 6ce24e1 into weaveworks:master Oct 12, 2020
@darkowlzz darkowlzz deleted the concurrent-vm-creation branch October 12, 2020 17:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent VM creation failure
3 participants