Merge pull request #9847 from akhilerm/replace-prestart-oci-hook

replace deprecated Prestart to CreateRuntime hook
This commit is contained in:
Maksym Pavlenko 2024-02-20 21:51:02 +00:00 committed by GitHub
commit d32dc0e76d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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{