mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00:00
runtime: check if error loading runtime config
Looks like we inadvertantly removed the check on the loadRuntimeConfig error return value. Adding back... Fixes: #1474 Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
This commit is contained in:
parent
4f67bf919d
commit
0f7098339b
@ -61,6 +61,9 @@ func create(ctx context.Context, s *service, r *taskAPI.CreateTaskRequest) (*con
|
|||||||
}
|
}
|
||||||
|
|
||||||
s.config, err = loadRuntimeConfig(s, r, ociSpec.Annotations)
|
s.config, err = loadRuntimeConfig(s, r, ociSpec.Annotations)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// create tracer
|
// create tracer
|
||||||
// This is the earliest location we can create the tracer because we must wait
|
// This is the earliest location we can create the tracer because we must wait
|
||||||
@ -101,9 +104,9 @@ func create(ctx context.Context, s *service, r *taskAPI.CreateTaskRequest) (*con
|
|||||||
go s.startManagementServer(ctx, ociSpec)
|
go s.startManagementServer(ctx, ociSpec)
|
||||||
|
|
||||||
case vc.PodContainer:
|
case vc.PodContainer:
|
||||||
var span otelTrace.Span
|
var span otelTrace.Span
|
||||||
span, s.ctx = trace(s.ctx, "create")
|
span, s.ctx = trace(s.ctx, "create")
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
||||||
if s.sandbox == nil {
|
if s.sandbox == nil {
|
||||||
return nil, fmt.Errorf("BUG: Cannot start the container, since the sandbox hasn't been created")
|
return nil, fmt.Errorf("BUG: Cannot start the container, since the sandbox hasn't been created")
|
||||||
|
Loading…
Reference in New Issue
Block a user