Add debugging statements

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

Closes: #109
Approved by: mheon
This commit is contained in:
Matthew Heon 2017-12-11 12:59:17 -05:00 committed by Atomic Bot
parent 840eb04e03
commit 08762dcd61
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,8 @@ func (r *Runtime) createNetNS(ctr *Container) (err error) {
} }
}() }()
logrus.Debugf("Made network namespace at %s for container %s", ctrNS.Path(), ctr.ID())
podNetwork := getPodNetwork(ctr.ID(), ctr.Name(), ctrNS.Path(), ctr.config.PortMappings) podNetwork := getPodNetwork(ctr.ID(), ctr.Name(), ctrNS.Path(), ctr.config.PortMappings)
if err := r.netPlugin.SetUpPod(podNetwork); err != nil { if err := r.netPlugin.SetUpPod(podNetwork); err != nil {
@ -118,6 +120,8 @@ func (r *Runtime) teardownNetNS(ctr *Container) error {
return nil return nil
} }
logrus.Debugf("Tearing down network namespace at %s for container %s", ctr.state.NetNS.Path(), ctr.ID())
portMappings, err := portMappingToHostport(ctr.config.PortMappings) portMappings, err := portMappingToHostport(ctr.config.PortMappings)
if err != nil { if err != nil {
logrus.Errorf("Failed to generate port mappings for container %s: %v", ctr.ID(), err) logrus.Errorf("Failed to generate port mappings for container %s: %v", ctr.ID(), err)