Skip to content

fix: don't check buildinfo or entitlements in agent #3956

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

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

deansheather
Copy link
Member

I have been having an issue recently in dogfood where my workspace was taking almost 10 minutes to connect after starting. I thought it was a bug due to the tailnet transition but today I decided to investigate after rebooting my workspace.

I found that it was appearing to do nothing for roughly 4 minutes before forking for the reaper code, then doing nothing for another 4 minutes. It logged after a while that it had a 502 error trying to retrieve buildinfo so I thought this was due to the version check we do. It turns out, my global coder config URL was set to a dead tunnel URL, and the version checks (and an entitlement check) were using this bogus URL instead of the agent URL.

These checks aren't very important IMO for agent startup, especially since people don't really look at the agent logs anyways.

  • Bail early in the version check code if the command is agent
  • Add short 10s contexts to the buildinfo check and entitlements check so they die quickly
  • Add error logging for failed entitlements checks

@deansheather deansheather merged commit bb4a681 into main Sep 8, 2022
@deansheather deansheather deleted the fix-agent-slow-starts branch September 8, 2022 13:59
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.

2 participants