Add additional debug logging

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #482
Approved by: baude
This commit is contained in:
Matthew Heon
2018-03-15 10:14:57 -04:00
committed by Atomic Bot
parent d176e9f781
commit 1856703e38
2 changed files with 10 additions and 0 deletions

View File

@ -260,6 +260,8 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e
}
}
logrus.Debugf("Creating new exec session in container %s with session id %s", c.ID(), sessionID)
execCmd, err := c.runtime.ociRuntime.execContainer(c, cmd, capList, env, tty, user, sessionID)
if err != nil {
return errors.Wrapf(err, "error creating exec command for container %s", c.ID())
@ -318,6 +320,8 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e
return errors.Wrapf(err, "error saving exec sessions %s for container %s", sessionID, c.ID())
}
logrus.Debugf("Successfully started exec session %s in container %s", sessionID, c.ID())
// Unlock so other processes can use the container
c.lock.Unlock()
locked = false