When setting up k8s, the following error appeared, failing
to setup coredns pod.

  NetworkPlugin cni failed to set up pod "coredns-5f7fc64c95-4nnfq_kube-system" 
network: fork/exec /opt/cni/bin/loopback: no such file or directory

This is because the binary, /opt/cni/bin/loopback, has wrong interpreter.

So fix do_compile to use ${GO} instead of go to fix this problem.

Signed-off-by: Chen Qi <[email protected]>
---
 recipes-networking/cni/cni_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes-networking/cni/cni_git.bb 
b/recipes-networking/cni/cni_git.bb
index 266ee69..495b9c1 100644
--- a/recipes-networking/cni/cni_git.bb
+++ b/recipes-networking/cni/cni_git.bb
@@ -47,10 +47,10 @@ do_compile() {
        export CGO_ENABLED="1"
 
        cd ${S}/src/import/vendor/github.com/containernetworking/cni/libcni
-       go build
+       ${GO} build
 
        cd ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool
-       go build
+       ${GO} build
 
        cd ${S}/src/import/vendor/github.com/containernetworking/plugins/
        PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/main/* | grep -v 
windows)"
@@ -58,7 +58,7 @@ do_compile() {
        for p in $PLUGINS; do
            plugin="$(basename "$p")"
            echo "building: $p"
-           go build -o ${WORKDIR}/plugins/bin/$plugin 
github.com/containernetworking/plugins/$p
+           ${GO} build -o ${WORKDIR}/plugins/bin/$plugin 
github.com/containernetworking/plugins/$p
        done
 }
 
-- 
2.17.1

-- 
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Reply via email to