From 5e059824daf070463bc33ac443878035cf7860a1 Mon Sep 17 00:00:00 2001 From: "YiLin.Li" Date: Mon, 7 Sep 2020 13:02:22 +0000 Subject: [PATCH] shim/runtime: Clean up unused remote attestation codes in service.go Signed-off-by: Yilin Li --- shim/runtime/v2/rune/v2/service.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/shim/runtime/v2/rune/v2/service.go b/shim/runtime/v2/rune/v2/service.go index cd2bde9..261496a 100644 --- a/shim/runtime/v2/rune/v2/service.go +++ b/shim/runtime/v2/rune/v2/service.go @@ -367,20 +367,11 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ * v, err := typeurl.UnmarshalAny(r.Options) if err != nil { logrus.Errorf("Get rune options error: %v", err) - } - if err != nil { return nil, err } opts = *v.(*options.Options) } - //result := make(chan bool, 1) - // start remote attestation - if opts.BinaryName == constants.RuneOCIRuntime { - logrus.Infof("Attestation Start") - //go attestation.Attestation_main(ctx, result) - } - ns, err := namespaces.NamespaceRequired(ctx) if err != nil { return nil, err @@ -417,15 +408,6 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ * logrus.Infof("TaskCreate sent: %s %d", r.ID, container.Pid()) - if opts.BinaryName == constants.RuneOCIRuntime { - //// judge remote attestation result - //switch <-result { - //case true: - // log.G(ctx).Infof("Attestation Success!") - //case false: - // log.G(ctx).Infof("Attestation Failed!") - //} - } logrus.Debugf("Create: total time cost: %d", (time.Now().Sub(timeStart))/time.Second) logrus.Debugf("Create: total time cost: %d", (time.Now().Sub(ts))/time.Second) return &taskAPI.CreateTaskResponse{ -- GitLab