-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update consul-template to v0.24.1 and remove deprecated vault grace #7170
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,7 +359,7 @@ func parseTemplates(result *[]*api.Template, list *ast.ObjectList) error { | |
"source", | ||
"splay", | ||
"env", | ||
"vault_grace", | ||
"vault_grace", //COMPAT(0.12) not used; emits warning in 0.11. | ||
} | ||
if err := helper.CheckHCLKeys(o.Val, valid); err != nil { | ||
return err | ||
|
@@ -374,6 +374,7 @@ func parseTemplates(result *[]*api.Template, list *ast.ObjectList) error { | |
ChangeMode: helper.StringToPtr("restart"), | ||
Splay: helper.TimeToPtr(5 * time.Second), | ||
Perms: helper.StringToPtr("0644"), | ||
VaultGrace: helper.TimeToPtr(0), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added default value in parser. Time.period can not be nil. |
||
} | ||
|
||
dec, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this is probably the source of panics/issues. It ensured VaultGrace was always initialized (never nil) in the HTTP API.
Removing this code is the right thing to do. We just need to fix any code that depended on VaultGrace always being non-nil. I'll investigate and try to help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry haven't found time today to fix this up. The really sneaky place that converts public
api
structs to internalnomad/structs
structs is hidden in the job endpoint here: https://github.com/hashicorp/nomad/blob/v0.10.4/command/agent/job_endpoint.go#L620That may need updating to convert
nil
api VaultGrace values to0
nomad/struct VaultGrace values.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment below.