mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-17 08:53:26 +00:00
Merge pull request #10935 from burgerdev/error-messages
runtime: add cause to CDI errors
This commit is contained in:
commit
7b16df64c9
@ -123,7 +123,7 @@ func create(ctx context.Context, s *service, r *taskAPI.CreateTaskRequest) (*con
|
||||
if containerType == vc.SingleContainer {
|
||||
_, err = config.WithCDI(ociSpec.Annotations, []string{}, ociSpec)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("adding CDI devices failed")
|
||||
return nil, fmt.Errorf("adding CDI devices failed: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -742,7 +742,7 @@ func (s *Sandbox) coldOrHotPlugVFIO(sandboxConfig *SandboxConfig) (bool, error)
|
||||
//
|
||||
_, err := config.WithCDI(cdiSpec.Annotations, []string{}, cdiSpec)
|
||||
if err != nil {
|
||||
return coldPlugVFIO, fmt.Errorf("adding CDI devices failed")
|
||||
return coldPlugVFIO, fmt.Errorf("adding CDI devices failed: %w", err)
|
||||
}
|
||||
|
||||
for _, dev := range cdiSpec.Linux.Devices {
|
||||
|
Loading…
Reference in New Issue
Block a user