jenkinsci / hetzner-cloud-plugin

Hetzner cloud integration for Jenkins
https://plugins.jenkins.io/hetzner-cloud/
Apache License 2.0
24 stars 8 forks source link

Serialize access to HetznerCloudResourceManager#createServer() #58

Closed rkosegi closed 1 year ago

rkosegi commented 1 year ago

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