mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-01 13:14:33 +00:00
katautils: Run the preStart hook in the host namespace
The OCI spec is very specific about it: "The prestart hooks MUST be executed in the runtime namespace." Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
This commit is contained in:
parent
6be6d0a3b3
commit
d9dfce1453
@ -155,11 +155,8 @@ func CreateSandbox(ctx context.Context, vci vc.VC, ociSpec specs.Spec, runtimeCo
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Run pre-start OCI hooks.
|
// Run pre-start OCI hooks, in the runtime namespace.
|
||||||
err = EnterNetNS(sandboxConfig.NetworkConfig.NetworkID, func() error {
|
if err := PreStartHooks(ctx, ociSpec, containerID, bundlePath); err != nil {
|
||||||
return PreStartHooks(ctx, ociSpec, containerID, bundlePath)
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, vc.Process{}, err
|
return nil, vc.Process{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user