mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 01:02:33 +00:00
shimv2: log a warning and continue on post-start hook failure
According to runtime-spec: The poststart hooks MUST be invoked by the runtime. If any poststart hook fails, the runtime MUST log a warning, but the remaining hooks and lifecycle continue as if the hook had succeeded Fixes: #1252 Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
This commit is contained in:
parent
e7043fe284
commit
0e57393fcc
@ -52,7 +52,9 @@ func startContainer(ctx context.Context, s *service, c *container) error {
|
|||||||
return katautils.PostStartHooks(ctx, *c.spec, s.sandbox.ID(), c.bundle)
|
return katautils.PostStartHooks(ctx, *c.spec, s.sandbox.ID(), c.bundle)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
// log warning and continue, as defined in oci runtime spec
|
||||||
|
// https://github.com/opencontainers/runtime-spec/blob/master/runtime.md#lifecycle
|
||||||
|
shimLog.WithError(err).Warn("Failed to run post-start hooks")
|
||||||
}
|
}
|
||||||
|
|
||||||
c.status = task.StatusRunning
|
c.status = task.StatusRunning
|
||||||
|
Loading…
Reference in New Issue
Block a user