From 6aaffa30f0c6a89694208ef57e74d4868a611f76 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Tue, 29 Aug 2017 16:57:40 -0700 Subject: [PATCH] vendor template --- .../consul-template/manager/runner.go | 7 ++- .../consul-template/signals/signals_unix.go | 57 ++++++++++--------- vendor/vendor.json | 32 +++++------ 3 files changed, 51 insertions(+), 45 deletions(-) diff --git a/vendor/github.com/hashicorp/consul-template/manager/runner.go b/vendor/github.com/hashicorp/consul-template/manager/runner.go index c1347277c..bb31b3138 100644 --- a/vendor/github.com/hashicorp/consul-template/manager/runner.go +++ b/vendor/github.com/hashicorp/consul-template/manager/runner.go @@ -249,12 +249,16 @@ func (r *Runner) Start() { } if r.allTemplatesRendered() { + log.Printf("[DEBUG] (runner) all templates rendered") + // If an exec command was given and a command is not currently running, // spawn the child process for supervision. if config.StringPresent(r.config.Exec.Command) { // Lock the child because we are about to check if it exists. r.childLock.Lock() + log.Printf("[TRACE] (runner) acquired child lock for command, spawning") + if r.child == nil { env := r.config.Exec.Env.Copy() env.Custom = append(r.childEnv(), env.Custom...) @@ -946,7 +950,8 @@ func (r *Runner) allTemplatesRendered() bool { defer r.renderEventsLock.RUnlock() for _, tmpl := range r.templates { - if _, rendered := r.renderEvents[tmpl.ID()]; !rendered { + event, rendered := r.renderEvents[tmpl.ID()] + if !rendered || !event.DidRender { return false } } diff --git a/vendor/github.com/hashicorp/consul-template/signals/signals_unix.go b/vendor/github.com/hashicorp/consul-template/signals/signals_unix.go index 77b70d85d..0b614e93b 100644 --- a/vendor/github.com/hashicorp/consul-template/signals/signals_unix.go +++ b/vendor/github.com/hashicorp/consul-template/signals/signals_unix.go @@ -8,32 +8,33 @@ import ( ) var SignalLookup = map[string]os.Signal{ - "SIGABRT": syscall.SIGABRT, - "SIGALRM": syscall.SIGALRM, - "SIGBUS": syscall.SIGBUS, - "SIGCHLD": syscall.SIGCHLD, - "SIGCONT": syscall.SIGCONT, - "SIGFPE": syscall.SIGFPE, - "SIGHUP": syscall.SIGHUP, - "SIGILL": syscall.SIGILL, - "SIGINT": syscall.SIGINT, - "SIGIO": syscall.SIGIO, - "SIGIOT": syscall.SIGIOT, - "SIGKILL": syscall.SIGKILL, - "SIGPIPE": syscall.SIGPIPE, - "SIGPROF": syscall.SIGPROF, - "SIGQUIT": syscall.SIGQUIT, - "SIGSEGV": syscall.SIGSEGV, - "SIGSTOP": syscall.SIGSTOP, - "SIGSYS": syscall.SIGSYS, - "SIGTERM": syscall.SIGTERM, - "SIGTRAP": syscall.SIGTRAP, - "SIGTSTP": syscall.SIGTSTP, - "SIGTTIN": syscall.SIGTTIN, - "SIGTTOU": syscall.SIGTTOU, - "SIGURG": syscall.SIGURG, - "SIGUSR1": syscall.SIGUSR1, - "SIGUSR2": syscall.SIGUSR2, - "SIGXCPU": syscall.SIGXCPU, - "SIGXFSZ": syscall.SIGXFSZ, + "SIGABRT": syscall.SIGABRT, + "SIGALRM": syscall.SIGALRM, + "SIGBUS": syscall.SIGBUS, + "SIGCHLD": syscall.SIGCHLD, + "SIGCONT": syscall.SIGCONT, + "SIGFPE": syscall.SIGFPE, + "SIGHUP": syscall.SIGHUP, + "SIGILL": syscall.SIGILL, + "SIGINT": syscall.SIGINT, + "SIGIO": syscall.SIGIO, + "SIGIOT": syscall.SIGIOT, + "SIGKILL": syscall.SIGKILL, + "SIGPIPE": syscall.SIGPIPE, + "SIGPROF": syscall.SIGPROF, + "SIGQUIT": syscall.SIGQUIT, + "SIGSEGV": syscall.SIGSEGV, + "SIGSTOP": syscall.SIGSTOP, + "SIGSYS": syscall.SIGSYS, + "SIGTERM": syscall.SIGTERM, + "SIGTRAP": syscall.SIGTRAP, + "SIGTSTP": syscall.SIGTSTP, + "SIGTTIN": syscall.SIGTTIN, + "SIGTTOU": syscall.SIGTTOU, + "SIGURG": syscall.SIGURG, + "SIGUSR1": syscall.SIGUSR1, + "SIGUSR2": syscall.SIGUSR2, + "SIGWINCH": syscall.SIGWINCH, + "SIGXCPU": syscall.SIGXCPU, + "SIGXFSZ": syscall.SIGXFSZ, } diff --git a/vendor/vendor.json b/vendor/vendor.json index d306fb753..025c95475 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -611,44 +611,44 @@ { "checksumSHA1": "Nu2j1GusM7ZH0uYrGzqr1K7yH7I=", "path": "github.com/hashicorp/consul-template/child", - "revision": "7b3f45039cf3ad1a758683fd3eebb1cc72affa06", - "revisionTime": "2017-08-01T00:58:49Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { "checksumSHA1": "lemUzh6uQDMxuvTT/BREYdGcS0U=", "path": "github.com/hashicorp/consul-template/config", - "revision": "7b3f45039cf3ad1a758683fd3eebb1cc72affa06", - "revisionTime": "2017-08-01T00:58:49Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { "checksumSHA1": "WVZ+pqn/HLLXjj+Tj5ZZvD7w6r0=", "path": "github.com/hashicorp/consul-template/dependency", - "revision": "7b3f45039cf3ad1a758683fd3eebb1cc72affa06", - "revisionTime": "2017-08-01T00:58:49Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { - "checksumSHA1": "tkMwyjIrH+reCJWIg45lvcmkhVQ=", + "checksumSHA1": "ZuqKmrZAWgHbWGGt1e9RAMZ4wvs=", "path": "github.com/hashicorp/consul-template/manager", - "revision": "252f61dede55b1009323aae8b0ffcd2e2e933173", - "revisionTime": "2017-08-09T17:59:55Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { - "checksumSHA1": "oskgb0WteBKOItG8NNDduM7E/D0=", + "checksumSHA1": "YSEUV/9/k85XciRKu0cngxdjZLE=", "path": "github.com/hashicorp/consul-template/signals", - "revision": "7b3f45039cf3ad1a758683fd3eebb1cc72affa06", - "revisionTime": "2017-08-01T00:58:49Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { "checksumSHA1": "zSvJlNfZS3fCRlFaZ7r9Q+N17T8=", "path": "github.com/hashicorp/consul-template/template", - "revision": "7b3f45039cf3ad1a758683fd3eebb1cc72affa06", - "revisionTime": "2017-08-01T00:58:49Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { "checksumSHA1": "b4+Y+02pY2Y5620F9ALzKg8Zmdw=", "path": "github.com/hashicorp/consul-template/watch", - "revision": "7b3f45039cf3ad1a758683fd3eebb1cc72affa06", - "revisionTime": "2017-08-01T00:58:49Z" + "revision": "a6369e8e105f2f5534671e2609dc19e20b55da96", + "revisionTime": "2017-08-25T23:40:39Z" }, { "checksumSHA1": "jfELEMRhiTcppZmRH+ZwtkVS5Uw=",