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

add validation for job_gc_interval #6277

Merged
merged 2 commits into from
Sep 5, 2019
Merged

Conversation

jazzyfresh
Copy link
Contributor

@jazzyfresh jazzyfresh commented Sep 5, 2019

Overview

follow-up to #5978

The command/agent currently panics if the duration is an invalid value, this pull request adds validation.

Behavior

The panic

panic: non-positive interval for NewTicker                                                                               [190/1172]
                                                                                                                                   
goroutine 188 [running]:                                                                                                           
time.NewTicker(0xfffffffdabf41c00, 0x240c218)                                                                                      
        /usr/local/go/src/time/tick.go:23 +0x190                                                                                   
github.com/hashicorp/nomad/nomad.(*Server).schedulePeriodic(0xc0000e2000, 0xc0004a6240)                                            
        /home/jasmine/go/src/github.com/hashicorp/nomad/nomad/leader.go:446 +0xe1                                                  
created by github.com/hashicorp/nomad/nomad.(*Server).establishLeadership                                                          
        /home/jasmine/go/src/github.com/hashicorp/nomad/nomad/leader.go:243 +0x3c8

The fix w/ command/agent config validation for job_gc_interval

Screenshot from 2019-09-05 10-44-26

Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

Great catch!

Copy link
Contributor

@notnoop notnoop left a comment

Choose a reason for hiding this comment

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

Thanks! A small tweak suggestion too.

command/agent/agent.go Outdated Show resolved Hide resolved
Co-Authored-By: Mahmood Ali <mahmood@hashicorp.com>
@jazzyfresh jazzyfresh merged commit 50c515a into master Sep 5, 2019
@jazzyfresh jazzyfresh deleted the b-gc-interval-validation branch September 5, 2019 18:20
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants