diff --git a/shim/runtime/v2/rune/types.go b/shim/runtime/v2/rune/types.go index dcf154ee10bb6fc9a8840d270f0ebaaa07c645ea..358e047921cc249442414c9754b2d7d5bdedd44f 100644 --- a/shim/runtime/v2/rune/types.go +++ b/shim/runtime/v2/rune/types.go @@ -10,6 +10,7 @@ const ( Empty CarrierKind = "" Occlum CarrierKind = "occlum" Graphene CarrierKind = "graphene" + Skeleton CarrierKind = "skeleton" ) var ErrorUnknownCarrier = errors.New("unknown carrier") diff --git a/shim/runtime/v2/rune/v2/rune.go b/shim/runtime/v2/rune/v2/rune.go index ff1e3e2fa0da1efc1085aea4343d1c750c10f2c1..0e0ee21b809c2888fa37c3a94fc62d1a72f290ec 100644 --- a/shim/runtime/v2/rune/v2/rune.go +++ b/shim/runtime/v2/rune/v2/rune.go @@ -141,7 +141,7 @@ func getCarrierKind(bundlePath string) (found bool, value rune.CarrierKind, err return } value = rune.CarrierKind(v) - if value == rune.Occlum || value == rune.Graphene || value == rune.Empty { + if value == rune.Occlum || value == rune.Graphene || value == rune.Empty || value == rune.Skeleton { found = true return } diff --git a/shim/runtime/v2/rune/v2/service.go b/shim/runtime/v2/rune/v2/service.go index 8cea20f864dafa65f028538511a2533176ba225e..0911479df1ee5248bf5291fd1fc7f6480f6d1961 100644 --- a/shim/runtime/v2/rune/v2/service.go +++ b/shim/runtime/v2/rune/v2/service.go @@ -30,6 +30,7 @@ import ( "syscall" "time" + "github.com/alibaba/inclavare-containers/shim/runtime/v2/rune" "github.com/alibaba/inclavare-containers/shim/runtime/v2/rune/constants" "github.com/containerd/cgroups" eventstypes "github.com/containerd/containerd/api/events" @@ -307,13 +308,20 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ * return nil, err } - carr, err := s.carrierMain(r) + _, carrierKind, err := getCarrierKind(r.Bundle) if err != nil { return nil, err } + if carrierKind != rune.Skeleton { + carr, err := s.carrierMain(r) + if err != nil { + return nil, err + } + logrus.Infof("Carrier: %v", carr.Name()) + } data, _ := json.Marshal(r) - logrus.Infof("CreateTaskRequest: %s, Carrier: %v", string(data), carr.Name()) + logrus.Infof("CreateTaskRequest: %s", string(data)) container, err := runc.NewContainer(ctx, s.platform, r) if err != nil {