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

Ensure plugin directory exists, otherwise checkout lock thrashes #828

Merged
merged 1 commit into from Oct 8, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented Oct 8, 2018

It appears that with #827 we've introduced a bug where if the plugin directory doesn't exist the agent will never be able to acquire the checkout lock. The result is races with output like:

# Could not acquire lock on "/usr/local/var/buildkite-agent/plugins/github-com-buildkite-plugins-docker-buildkite-plugin-v1-4-0.lock" (open /usr/local/var/buildkite-agent/plugins/953740525: no such file or directory)
--
  | # Trying again in 1s...
  | # Could not acquire lock on "/usr/local/var/buildkite-agent/plugins/github-com-buildkite-plugins-docker-buildkite-plugin-v1-4-0.lock" (open /usr/local/var/buildkite-agent/plugins/969463144: no such file or directory)
  | # Trying again in 1s...
  | # Could not acquire lock on "/usr/local/var/buildkite-agent/plugins/github-com-buildkite-plugins-docker-buildkite-plugin-v1-4-0.lock" (open /usr/local/var/buildkite-agent/plugins/800153511: no such file or directory)

This PR fixes the issue by ensuring that the PluginsPath exists prior to acquiring the lock.

@lox lox requested a review from sj26 October 8, 2018 06:28
@lox lox merged commit a24d182 into master Oct 8, 2018
@lox lox deleted the ensure-plugin-dir-exists branch October 8, 2018 06:49
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.

None yet

2 participants