WasmEdge icon indicating copy to clipboard operation
WasmEdge copied to clipboard

module name conflict when WasmEdge on k8s

Open EthanLiu1991 opened this issue 2 years ago • 7 comments

Description

I build the wasm OCI image which can be run correctly through 'ctr run', but when I deploy container on k8s, I get the following error. The reference I take to build the OCI image is https://nigelpoulton.com/getting-started-with-docker-and-wasm How to run wasm workloads on Kubernetes: https://nigelpoulton.com/webassembly-on-kubernetes-everything-you-need-to-know

Current State

[error] instantiation failed: module name conflict, Code: 0x60 [error] At AST node: module

Expected

wasm container can run on k8s correctly.

Environment

Ubuntu 22.04 Kubernetes 1.22.5 Containerd 1.5.8 WasmEdge 0.11.2

EthanLiu1991 avatar Apr 21 '23 11:04 EthanLiu1991

@dm4 Can you help take a look? Thanks.

alabulei1 avatar Apr 22 '23 13:04 alabulei1

Hi @EthanLiu1991 Could you please provide your OCI image?

hydai avatar Apr 22 '23 20:04 hydai

@hydai When I use this image whether ctr or k8s, it works: docker.io/duizhang/wasi-demo-app:latest

When I use the image I build myself, only ctr can run: sudo ctr run --rm --runtime=io.containerd.wasmedge.v1 docker.io/ethanliu1991/wasmedge:test testwasmedge then, it prints [hello]

But when I use this image on k8s, it shows the error: [error] instantiation failed: module name conflict, Code: 0x60 [error] At AST node: module

EthanLiu1991 avatar Apr 23 '23 02:04 EthanLiu1991

Thanks for the information. Have you uploaded your image to the docker hub or anywhere? So we can try the problematic image directly.

hydai avatar Apr 25 '23 07:04 hydai

@hydai Yes, I've already uploaded the image to my dockerhub.

EthanLiu1991 avatar Apr 25 '23 09:04 EthanLiu1991

Could you provide link to the image?

dannypsnl avatar Oct 30 '23 09:10 dannypsnl

ethanliu1991/wasmedge:test image: https://hub.docker.com/repository/docker/ethanliu1991/wasmedge/tags?page=1&ordering=last_updated

EthanLiu1991 avatar Nov 01 '23 01:11 EthanLiu1991