replace deprecated Prestart to CreateRuntime hook

Prestart Hook is deprecated and can be replaced with CreateRuntime hook

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
Akhil Mohan 2024-02-20 21:54:47 +05:30
parent 4612201f87
commit 0693b936d2
No known key found for this signature in database
GPG Key ID: CB72A322B3B5DEDA
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ func WithGPUs(opts ...Opts) oci.SpecOpts {
if s.Hooks == nil { if s.Hooks == nil {
s.Hooks = &specs.Hooks{} s.Hooks = &specs.Hooks{}
} }
s.Hooks.Prestart = append(s.Hooks.Prestart, specs.Hook{ s.Hooks.CreateRuntime = append(s.Hooks.CreateRuntime, specs.Hook{
Path: c.OCIHookPath, Path: c.OCIHookPath,
Args: append([]string{ Args: append([]string{
"containerd", "containerd",

View File

@ -1737,7 +1737,7 @@ func TestContainerHook(t *testing.T) {
if err != nil { if err != nil {
return err return err
} }
s.Hooks.Prestart = []specs.Hook{ s.Hooks.CreateRuntime = []specs.Hook{
{ {
Path: path, Path: path,
Args: []string{ Args: []string{