Skip to content

fix(coderd): extract provisionerdserver.StaleInterval to 90 seconds - #15643

Merged
johnstcn merged 3 commits into
mainfrom
cj/provisionerdserver-staleheartbeats
Nov 28, 2024
Merged

johnstcn merged 3 commits into
mainfrom
cj/provisionerdserver-staleheartbeats

Conversation

@johnstcn

@johnstcn johnstcn commented Nov 25, 2024 •

Copy link
Copy Markdown
Member

Follow-up from #15578

Extracts provisionerdserver.StaleInterval and sets it to 90 seconds by default

@johnstcn johnstcn self-assigned this Nov 25, 2024

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an improvement, but I still find this approach lacking.

Comment thread coderd/templateversions.go Resolved
@johnstcn johnstcn changed the title fix(coderd): extract provisionerdserver.StaleHeartbeats, reduce from 3 to 2 fix(coderd): extract provisionerdserver.StaleInterval to 90 seconds Nov 25, 2024
@johnstcn
johnstcn requested a review from mafredri November 25, 2024 21:05

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the change 👍🏻, if we noticed that the decreased interval leads to too many false-positive stale states, then we can consider raising it to 150s or something like that.


// StaleInterval is the amount of time after the last heartbeat for which
// the provisioner will be reported as 'stale'.
StaleInterval = 90 * time.Second

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I configure my heartbeat interval to be greater than 90 sec, it reads like this will introduce false negatives where a heartbeat simply hasn't run but the provisioner presents as stale. Am I missing something?

@johnstcn johnstcn Nov 28, 2024 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, but we don't expose that as a coderd configuration knob yet. The only way you could configure that is by editing the source code right now.

@johnstcn
johnstcn merged commit ef09b51 into main Nov 28, 2024
@johnstcn
johnstcn deleted the cj/provisionerdserver-staleheartbeats branch November 28, 2024 12:57
johnstcn added a commit that referenced this pull request Dec 12, 2024
…15643)

Follow-up from #15578

Extracts `provisionerdserver.StaleInterval` and sets it to 90 seconds by
default

(cherry picked from commit ef09b51)
johnstcn added a commit that referenced this pull request Dec 12, 2024
…15643)

Follow-up from #15578

Extracts `provisionerdserver.StaleInterval` and sets it to 90 seconds by
default

(cherry picked from commit ef09b51)
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.

3 participants