Skip to content

Commit 3eff01d

Browse files
committed
fix
Signed-off-by: Rishi Jat <rishijat098@gmail.com>
1 parent c5b1aaf commit 3eff01d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/unikontainers/unikontainers.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ var uniklog = logrus.WithField("subsystem", "unikontainers")
5151
var ErrQueueProxy = errors.New("this a queue proxy container")
5252
var ErrNotUnikernel = errors.New("this is not a unikernel container")
5353
var ErrNotExistingNS = errors.New("the namespace does not exist")
54-
var ErrMissingLinuxSpec = errors.New("invalid OCI spec: linux section is required")
5554

5655
// Unikontainer holds the data necessary to create, manage and delete unikernel containers
5756
type Unikontainer struct {
@@ -72,7 +71,7 @@ func New(bundlePath string, containerID string, rootDir string, cfg *UruncConfig
7271
}
7372

7473
if spec == nil || spec.Linux == nil {
75-
return nil, ErrMissingLinuxSpec
74+
return nil, fmt.Errorf("invalid OCI spec: linux section is required")
7675
}
7776

7877
containerName := spec.Annotations["io.kubernetes.cri.container-name"]
@@ -131,7 +130,7 @@ func Get(containerID string, rootDir string) (*Unikontainer, error) {
131130
return nil, err
132131
}
133132
if spec == nil || spec.Linux == nil {
134-
return nil, ErrMissingLinuxSpec
133+
return nil, fmt.Errorf("invalid OCI spec: linux section is required")
135134
}
136135
u.BaseDir = containerDir
137136
u.RootDir = rootDir

0 commit comments

Comments
 (0)