Skip to content

fix: Serialize webhook deploys to prevent ansible-pull races - #205

Open
VedantMadane wants to merge 3 commits into
clicepfl:mainfrom
VedantMadane:fix/issue-193
Open

fix: Serialize webhook deploys to prevent ansible-pull races#205
VedantMadane wants to merge 3 commits into
clicepfl:mainfrom
VedantMadane:fix/issue-193

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

Serialize webhook deploys to prevent ansible-pull races

Changes

  • init.yaml: serialize concurrent deploys with flock

Fixes #193

- init.yaml: serialize concurrent deploys with flock

Fixes clicepfl#193

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
Prevent concurrent ansible-pull invocations when multiple webhook
deliveries arrive close together (Fixes clicepfl#193).

- Add DEPLOY_LOCK in restart.rs around the full restart sequence
- Revert incorrect init.yaml flock no-op from an earlier attempt

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
Hold a process-wide mutex around restart()/ansible-pull so concurrent
webhook deliveries cannot race the same repo checkout.

Fixes clicepfl#193

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
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.

Prevent race in webhook

1 participant