Minor cleanup.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
a49f66e0bb
commit
60e28a9460
@ -49,6 +49,7 @@ func (c *criContainerdService) startEventMonitor() error {
|
|||||||
func (c *criContainerdService) handleEventStream(events execution.ContainerService_EventsClient) {
|
func (c *criContainerdService) handleEventStream(events execution.ContainerService_EventsClient) {
|
||||||
// TODO(random-liu): [P1] Should backoff on this error, or else this will
|
// TODO(random-liu): [P1] Should backoff on this error, or else this will
|
||||||
// cause a busy loop.
|
// cause a busy loop.
|
||||||
|
// TODO(random-liu): Handle io.EOF.
|
||||||
e, err := events.Recv()
|
e, err := events.Recv()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to receive event: %v", err)
|
glog.Errorf("Failed to receive event: %v", err)
|
||||||
|
@ -35,7 +35,7 @@ func (c *criContainerdService) RemovePodSandbox(ctx context.Context, r *runtime.
|
|||||||
glog.V(2).Infof("RemovePodSandbox for sandbox %q", r.GetPodSandboxId())
|
glog.V(2).Infof("RemovePodSandbox for sandbox %q", r.GetPodSandboxId())
|
||||||
defer func() {
|
defer func() {
|
||||||
if retErr == nil {
|
if retErr == nil {
|
||||||
glog.V(2).Info("RemovePodSandbox %q returns successfully", r.GetPodSandboxId())
|
glog.V(2).Infof("RemovePodSandbox %q returns successfully", r.GetPodSandboxId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -65,6 +65,7 @@ func (c *criContainerdService) RemovePodSandbox(ctx context.Context, r *runtime.
|
|||||||
return nil, fmt.Errorf("sandbox container %q is not fully stopped", id)
|
return nil, fmt.Errorf("sandbox container %q is not fully stopped", id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(random-liu): [P0] Cleanup snapshot after switching to new snapshot api.
|
||||||
// TODO(random-liu): [P0] Cleanup shm created in RunPodSandbox.
|
// TODO(random-liu): [P0] Cleanup shm created in RunPodSandbox.
|
||||||
// TODO(random-liu): [P1] Remove permanent namespace once used.
|
// TODO(random-liu): [P1] Remove permanent namespace once used.
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ func (c *criContainerdService) StopPodSandbox(ctx context.Context, r *runtime.St
|
|||||||
glog.V(2).Infof("StopPodSandbox for sandbox %q", r.GetPodSandboxId())
|
glog.V(2).Infof("StopPodSandbox for sandbox %q", r.GetPodSandboxId())
|
||||||
defer func() {
|
defer func() {
|
||||||
if retErr == nil {
|
if retErr == nil {
|
||||||
glog.V(2).Info("StopPodSandbox %q returns successfully", r.GetPodSandboxId())
|
glog.V(2).Infof("StopPodSandbox %q returns successfully", r.GetPodSandboxId())
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ func (c *criContainerdService) StopPodSandbox(ctx context.Context, r *runtime.St
|
|||||||
} else if !os.IsNotExist(err) { // It's ok for sandbox.NetNS to *not* exist
|
} else if !os.IsNotExist(err) { // It's ok for sandbox.NetNS to *not* exist
|
||||||
return nil, fmt.Errorf("failed to stat netns path for sandbox %q before tearing down the network: %v", id, err)
|
return nil, fmt.Errorf("failed to stat netns path for sandbox %q before tearing down the network: %v", id, err)
|
||||||
}
|
}
|
||||||
glog.V(2).Info("TearDown network for sandbox %q successfully", id)
|
glog.V(2).Infof("TearDown network for sandbox %q successfully", id)
|
||||||
|
|
||||||
// TODO(random-liu): [P1] Handle sandbox container graceful deletion.
|
// TODO(random-liu): [P1] Handle sandbox container graceful deletion.
|
||||||
// Delete the sandbox container from containerd.
|
// Delete the sandbox container from containerd.
|
||||||
|
Loading…
Reference in New Issue
Block a user