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

Potential race condition between provision and delete #149

Open
gberche-orange opened this issue May 20, 2019 · 1 comment
Open

Potential race condition between provision and delete #149

gberche-orange opened this issue May 20, 2019 · 1 comment
Labels

Comments

@gberche-orange
Copy link
Member

gberche-orange commented May 20, 2019

It might be possible to have race condition between a provision request and a deprovision requests, resulting in dangling service instances in concourse that appear deleted in CF

image

Ways to address this:

  • add mutex between provision and deprovision
  • reduce race condition probability
    • by setting a timeout in git lower than the CC timeout.
      • plus keeping some headroom for potential git retries in between

See JGit Transport.setTimeout() number of seconds to wait (with no data transfer occurring) before aborting an IO read or write operation with this remote. and TransportHttp.java

@gberche-orange
Copy link
Member Author

Setting JGit (connect + read timeout) timeout to 55s, and retry max delay to 50s. Hoping that in case of gitlab hangs, a single attempt will be made.

gberche-orange added a commit that referenced this issue Apr 23, 2021
Add some headroom among git clone retries (5s=60s:CC default polling period -55s: retry clone duration)
gberche-orange added a commit that referenced this issue Apr 23, 2021
Setting JGit (connect + read timeout) timeout to 55s, and retry max delay to 50s. Hoping that in case of gitlab hangs, a single attempt will be made.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant