diff --git a/cmd/containerd-shim-runhcs-v1/delete.go b/cmd/containerd-shim-runhcs-v1/delete.go index ec673c4bec..dd65660430 100644 --- a/cmd/containerd-shim-runhcs-v1/delete.go +++ b/cmd/containerd-shim-runhcs-v1/delete.go @@ -6,7 +6,6 @@ import ( "fmt" "io/ioutil" "os" - "path/filepath" "time" "github.com/Microsoft/hcsshim/internal/hcs" @@ -30,6 +29,7 @@ The delete command will be executed in the container's bundle as its cwd. // We cant write anything to stdout for this cmd other than the // task.DeleteResponse by protcol. We can write to stderr which will be // warning logged in containerd. + logrus.SetOutput(ioutil.Discard) ctx, span := trace.StartSpan(gcontext.Background(), "delete") defer span.End() @@ -40,15 +40,6 @@ The delete command will be executed in the container's bundle as its cwd. return errors.New("bundle is required") } - // hcsshim shim writes panic logs in the bundle directory in a file named "panic.log" - // log those messages (if any) on stderr so that it shows up in containerd's log. - // This should be done as the first thing so that we don't miss any panic logs even if - // something goes wrong during delete op. - logs, err := ioutil.ReadFile(filepath.Join(bundleFlag, "panic.log")) - if err == nil && len(logs) > 0 { - logrus.WithField("log", string(logs)).Error("found shim panic logs during delete") - } - // Attempt to find the hcssystem for this bundle and terminate it. if sys, _ := hcs.OpenComputeSystem(ctx, idFlag); sys != nil { defer sys.Close()