mirror of
https://github.com/kemko/nomad.git
synced 2026-01-10 12:25:42 +03:00
Merge pull request #10403 from hashicorp/b-always-set-scriptchecks-hook
client: always set script checks hook
This commit is contained in:
@@ -143,14 +143,15 @@ func (tr *TaskRunner) initHooks() {
|
||||
}
|
||||
}
|
||||
|
||||
// If there are any script checks, add the hook
|
||||
scriptCheckHook := newScriptCheckHook(scriptCheckHookConfig{
|
||||
// Always add the script checks hook. A task with no script check hook on
|
||||
// initial registration may be updated to include script checks, which must
|
||||
// be handled with this hook.
|
||||
tr.runnerHooks = append(tr.runnerHooks, newScriptCheckHook(scriptCheckHookConfig{
|
||||
alloc: tr.Alloc(),
|
||||
task: tr.Task(),
|
||||
consul: tr.consulServiceClient,
|
||||
logger: hookLogger,
|
||||
})
|
||||
tr.runnerHooks = append(tr.runnerHooks, scriptCheckHook)
|
||||
}))
|
||||
}
|
||||
|
||||
func (tr *TaskRunner) emitHookError(err error, hookName string) {
|
||||
|
||||
Reference in New Issue
Block a user