Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize access to HetznerCloudResourceManager#createServer() #58

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

rkosegi
Copy link
Contributor

@rkosegi rkosegi commented Oct 21, 2022

As reported in #57, there is small window of opportunity for race condition during server creation. Primary IP allocation and server creation are two separate API calls that can't be done atomically. By serializing access to this method, this could be further mitigated as HetznerCloud instance is using same instance of HetznerCloudResourceManager during its lifecycle.

This fix won't prevent problems done externally.

Closes #57

As reported in #57, there is small window of oportunity for race
condition during server creation. Primary IP allocation and server
creation are two separate API calls that can't be done atomically.
By serializing access to this method, this could be further mitigated
as HetznerCloud instance is using same instance of HetznerCloudResourceManager
during its lifecycle.

This fix won't prevent problems done externally.

Closes #57
@rkosegi rkosegi merged commit 2ebb69e into main Oct 21, 2022
@rkosegi rkosegi deleted the bug/57 branch October 21, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception: Primary IP already assigned to another server
1 participant