core: Additional logging for Context.Stop
Since stopping is a rather complex mechanism that relies on correct handling of concurrency, it's handy to have these logs here to debug when things don't happen in quite the right order.
This commit is contained in:
parent
847c8d6244
commit
21071fb679
|
@ -603,6 +603,7 @@ func (c *Context) Stop() {
|
|||
|
||||
// Grab the condition var before we exit
|
||||
if cond := c.runCond; cond != nil {
|
||||
log.Printf("[INFO] terraform: waiting for graceful stop to complete")
|
||||
cond.Wait()
|
||||
}
|
||||
|
||||
|
@ -779,6 +780,7 @@ func (c *Context) watchStop(walker *ContextGraphWalker) (chan struct{}, <-chan s
|
|||
}
|
||||
|
||||
// If we're here, we're stopped, trigger the call.
|
||||
log.Printf("[TRACE] Context: requesting providers and provisioners to gracefully stop")
|
||||
|
||||
{
|
||||
// Copy the providers so that a misbehaved blocking Stop doesn't
|
||||
|
|
Loading…
Reference in New Issue