Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
inclavare-containers
提交
19ae82bd
I
inclavare-containers
项目概览
openanolis
/
inclavare-containers
通知
4
Star
7
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
5
列表
看板
标记
里程碑
合并请求
0
分析
仓库
DevOps
项目成员
Pages
I
inclavare-containers
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
5
Issue
5
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
19ae82bd
编写于
8月 24, 2020
作者:
S
stormgbs
提交者:
GitHub
8月 24, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #127 from hustliyilin/lyl-ra
shim: add the skeleton Enclave Runtime carrier.
上级
33e0d5cf
0364b2ac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
3 deletion
+12
-3
shim/runtime/v2/rune/types.go
shim/runtime/v2/rune/types.go
+1
-0
shim/runtime/v2/rune/v2/rune.go
shim/runtime/v2/rune/v2/rune.go
+1
-1
shim/runtime/v2/rune/v2/service.go
shim/runtime/v2/rune/v2/service.go
+10
-2
未找到文件。
shim/runtime/v2/rune/types.go
浏览文件 @
19ae82bd
...
@@ -10,6 +10,7 @@ const (
...
@@ -10,6 +10,7 @@ const (
Empty
CarrierKind
=
""
Empty
CarrierKind
=
""
Occlum
CarrierKind
=
"occlum"
Occlum
CarrierKind
=
"occlum"
Graphene
CarrierKind
=
"graphene"
Graphene
CarrierKind
=
"graphene"
Skeleton
CarrierKind
=
"skeleton"
)
)
var
ErrorUnknownCarrier
=
errors
.
New
(
"unknown carrier"
)
var
ErrorUnknownCarrier
=
errors
.
New
(
"unknown carrier"
)
shim/runtime/v2/rune/v2/rune.go
浏览文件 @
19ae82bd
...
@@ -141,7 +141,7 @@ func getCarrierKind(bundlePath string) (found bool, value rune.CarrierKind, err
...
@@ -141,7 +141,7 @@ func getCarrierKind(bundlePath string) (found bool, value rune.CarrierKind, err
return
return
}
}
value
=
rune
.
CarrierKind
(
v
)
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
found
=
true
return
return
}
}
...
...
shim/runtime/v2/rune/v2/service.go
浏览文件 @
19ae82bd
...
@@ -30,6 +30,7 @@ import (
...
@@ -30,6 +30,7 @@ import (
"syscall"
"syscall"
"time"
"time"
"github.com/alibaba/inclavare-containers/shim/runtime/v2/rune"
"github.com/alibaba/inclavare-containers/shim/runtime/v2/rune/constants"
"github.com/alibaba/inclavare-containers/shim/runtime/v2/rune/constants"
"github.com/containerd/cgroups"
"github.com/containerd/cgroups"
eventstypes
"github.com/containerd/containerd/api/events"
eventstypes
"github.com/containerd/containerd/api/events"
...
@@ -307,13 +308,20 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ *
...
@@ -307,13 +308,20 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ *
return
nil
,
err
return
nil
,
err
}
}
carr
,
err
:=
s
.
carrierMain
(
r
)
_
,
carrierKind
,
err
:=
getCarrierKind
(
r
.
Bundle
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
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
)
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
)
container
,
err
:=
runc
.
NewContainer
(
ctx
,
s
.
platform
,
r
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录