diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-11-07 13:32:26 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-11-07 13:33:19 -0800 |
commit | c92b9b7086b89fd8e7f5913bf74d04761163e24b (patch) | |
tree | 77c182bdc92daaf141f2c6cfc3882bc8ab8f9902 /runsc/boot/controller.go | |
parent | dce61075c03907a70362878d362b2b95ff06addf (diff) |
Add more logging to controller.go
PiperOrigin-RevId: 220519632
Change-Id: Iaeec007fc1aa3f0b72569b288826d45f2534c4bf
Diffstat (limited to 'runsc/boot/controller.go')
-rw-r--r-- | runsc/boot/controller.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runsc/boot/controller.go b/runsc/boot/controller.go index f884f8c6b..568aad117 100644 --- a/runsc/boot/controller.go +++ b/runsc/boot/controller.go @@ -169,7 +169,7 @@ type containerManager struct { // StartRoot will start the root container process. func (cm *containerManager) StartRoot(cid *string, _ *struct{}) error { - log.Debugf("containerManager.StartRoot") + log.Debugf("containerManager.StartRoot %q", *cid) // Tell the root container to start and wait for the result. cm.startChan <- struct{}{} if err := <-cm.startResultChan; err != nil { @@ -239,6 +239,7 @@ func (cm *containerManager) Start(args *StartArgs, _ *struct{}) error { err := cm.l.startContainer(cm.l.k, args.Spec, args.Conf, args.CID, args.FilePayload.Files) if err != nil { + log.Debugf("containerManager.Start failed %q: %+v", args.CID, args) return err } log.Debugf("Container %q started", args.CID) @@ -259,6 +260,7 @@ func (cm *containerManager) ExecuteAsync(args *control.ExecArgs, pid *int32) err log.Debugf("containerManager.ExecuteAsync: %+v", args) tgid, err := cm.l.executeAsync(args) if err != nil { + log.Debugf("containerManager.ExecuteAsync failed: %+v: %v", args, err) return err } *pid = int32(tgid) @@ -277,6 +279,7 @@ func (cm *containerManager) Checkpoint(o *control.SaveOpts, _ *struct{}) error { // Pause suspends a container. func (cm *containerManager) Pause(_, _ *struct{}) error { + log.Debugf("containerManager.Pause") cm.l.k.Pause() return nil } @@ -398,6 +401,7 @@ func (cm *containerManager) Restore(o *RestoreOpts, _ *struct{}) error { // Resume unpauses a container. func (cm *containerManager) Resume(_, _ *struct{}) error { + log.Debugf("containerManager.Resume") cm.l.k.Unpause() return nil } @@ -405,7 +409,9 @@ func (cm *containerManager) Resume(_, _ *struct{}) error { // Wait waits for the init process in the given container. func (cm *containerManager) Wait(cid *string, waitStatus *uint32) error { log.Debugf("containerManager.Wait") - return cm.l.waitContainer(*cid, waitStatus) + err := cm.l.waitContainer(*cid, waitStatus) + log.Debugf("containerManager.Wait returned, waitStatus: %v: %v", waitStatus, err) + return err } // WaitPIDArgs are arguments to the WaitPID method. |