diff --git a/.github/workflows/vm_test.yml b/.github/workflows/vm_test.yml index 446de372..abdae50e 100644 --- a/.github/workflows/vm_test.yml +++ b/.github/workflows/vm_test.yml @@ -197,6 +197,37 @@ jobs: sudo mkdir -p /opt/cni/bin sudo tar Cxzvf /opt/cni/bin "cni-plugins-linux-$(dpkg --print-architecture)-v${SAFE_CNI}.tgz" rm -f "cni-plugins-linux-$(dpkg --print-architecture)-v${SAFE_CNI}.tgz" + sudo mkdir -p /etc/cni/net.d + sudo tee /etc/cni/net.d/10-containerd-net.conflist > /dev/null <<'EOF' +{ + "cniVersion": "1.0.0", + "name": "containerd-net", + "plugins": [ + { + "type": "bridge", + "bridge": "cni0", + "isGateway": true, + "ipMasq": true, + "promiscMode": true, + "ipam": { + "type": "host-local", + "ranges": [ + [{ + "subnet": "10.88.0.0/16" + }] + ], + "routes": [ + { "dst": "0.0.0.0/0" } + ] + } + }, + { + "type": "portmap", + "capabilities": {"portMappings": true} + } + ] +} +EOF - name: Install nerdctl env: diff --git a/pkg/unikontainers/unikontainers.go b/pkg/unikontainers/unikontainers.go index ad0bf289..99e09006 100644 --- a/pkg/unikontainers/unikontainers.go +++ b/pkg/unikontainers/unikontainers.go @@ -87,7 +87,10 @@ func New(bundlePath string, containerID string, rootDir string, cfg *UruncConfig config, err := GetUnikernelConfig(bundlePath, spec) if err != nil { - return nil, ErrNotUnikernel + if errors.Is(err, os.ErrNotExist) { + return nil, ErrNotUnikernel + } + return nil, err } confMap := config.Map()