containerd / containerd/runwasi

"no unpack platforms defined: invalid argument" happens when `make load`

Open
#579 3 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
1.3k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

This error happens during the [Demo](https://github.com/containerd/runwasi/blob/73df3507171080f5146e5464f29f2aca29dd9ce6/README.md?plain=1#L199).

Env

```bash
uname -a
Linux keisuke-ubuntu-desktop 6.5.0-1016-aws #16~22.04.1-Ubuntu SMP Wed Mar 13 18:54:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

# Self build
ctr --version
ctr github.com/containerd/containerd/v2 v2.0.0-beta.2-452-gb6ffa2794
```

Error

```bash
make load
[ -f /home/ubuntu/Workspace/runwasi/dist/img.tar ] || make target/wasm32-wasi/debug/img.tar
[ -f /home/ubuntu/Workspace/runwasi/dist/img.tar ] || cp target/wasm32-wasi/debug/img.tar "dist/img.tar"
sudo ctr -n default image import --all-platforms dist/img.tar
ctr: rpc error: code = InvalidArgument desc = unable to initialize unpacker: no unpack platforms defined: invalid argument
make: *** [Makefile:195: load] Error 1
```

Workaround: Add `--local` flag since v1.7+ and run `ctr image import` directly.

Ref:
- https://github.com/containerd/containerd/issues/7592
- https://github.com/containerd/containerd/blob/a26c686ea2671dbdba0c1b6fd2320ca0693fa936/cmd/ctr/commands/images/import.go#L90-L93

```bash
sudo ctr -n default image import --local --all-platforms dist/img.tar
unpacking ghcr.io/containerd/runwasi/wasi-demo-app:latest (sha256:540abaea9e27f1d5f150358fffc3b4ed7dd72a732864d78917e99d6241744ad8)...done
```

I wanted to add `--local` flag to Makefile but I've noticed runwasi supports ctr `1.6.25+` that doesn't support `--local` flag.

https://github.com/containerd/runwasi/blob/73df3507171080f5146e5464f29f2aca29dd9ce6/Makefile#L196-L200

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.