diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2019-08-12 10:33:12 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-08-12 11:02:31 -0400 |
| commit | 9267ddff1a5e7f6bc9d37c13fe0904d20617826d (patch) | |
| tree | b881696bcc1e06bdeb3dd567f3f6fd505a617474 | |
| parent | 4eca42bc3b21026639d31930417c7f1bc20682ef (diff) | |
| download | meta-virtualization-9267ddff1a5e7f6bc9d37c13fe0904d20617826d.tar.gz | |
cni: fix problem about cross compilation
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 <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-networking/cni/cni_git.bb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes-networking/cni/cni_git.bb b/recipes-networking/cni/cni_git.bb index 266ee691..495b9c11 100644 --- a/recipes-networking/cni/cni_git.bb +++ b/recipes-networking/cni/cni_git.bb | |||
| @@ -47,10 +47,10 @@ do_compile() { | |||
| 47 | export CGO_ENABLED="1" | 47 | export CGO_ENABLED="1" |
| 48 | 48 | ||
| 49 | cd ${S}/src/import/vendor/github.com/containernetworking/cni/libcni | 49 | cd ${S}/src/import/vendor/github.com/containernetworking/cni/libcni |
| 50 | go build | 50 | ${GO} build |
| 51 | 51 | ||
| 52 | cd ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool | 52 | cd ${S}/src/import/vendor/github.com/containernetworking/cni/cnitool |
| 53 | go build | 53 | ${GO} build |
| 54 | 54 | ||
| 55 | cd ${S}/src/import/vendor/github.com/containernetworking/plugins/ | 55 | cd ${S}/src/import/vendor/github.com/containernetworking/plugins/ |
| 56 | PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/main/* | grep -v windows)" | 56 | PLUGINS="$(ls -d plugins/meta/*; ls -d plugins/main/* | grep -v windows)" |
| @@ -58,7 +58,7 @@ do_compile() { | |||
| 58 | for p in $PLUGINS; do | 58 | for p in $PLUGINS; do |
| 59 | plugin="$(basename "$p")" | 59 | plugin="$(basename "$p")" |
| 60 | echo "building: $p" | 60 | echo "building: $p" |
| 61 | go build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p | 61 | ${GO} build -o ${WORKDIR}/plugins/bin/$plugin github.com/containernetworking/plugins/$p |
| 62 | done | 62 | done |
| 63 | } | 63 | } |
| 64 | 64 | ||
