mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
Add additional debug logging
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #482 Approved by: baude
This commit is contained in:
@ -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
|
||||
|
@ -375,6 +375,8 @@ func (c *Container) init() error {
|
||||
// Deletes and recreates a container in the runtime
|
||||
// Should only be done on ContainerStateStopped containers
|
||||
func (c *Container) reinit() error {
|
||||
logrus.Debugf("Recreating container %s in OCI runtime", c.ID())
|
||||
|
||||
// If necessary, delete attach and ctl files
|
||||
if err := c.removeConmonFiles(); err != nil {
|
||||
return err
|
||||
@ -394,6 +396,8 @@ func (c *Container) reinit() error {
|
||||
return err
|
||||
}
|
||||
|
||||
logrus.Debugf("Successfully cleaned up container %s", c.ID())
|
||||
|
||||
// Initialize the container again
|
||||
return c.init()
|
||||
}
|
||||
@ -430,6 +434,8 @@ func (c *Container) initAndStart() (err error) {
|
||||
// If we are ContainerStateStopped we need to remove from runtime
|
||||
// And reset to ContainerStateConfigured
|
||||
if c.state.State == ContainerStateStopped {
|
||||
logrus.Debugf("Recreating container %s in OCI runtime", c.ID())
|
||||
|
||||
// If necessary, delete attach and ctl files
|
||||
if err := c.removeConmonFiles(); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user