intel / userspace-cni-network-plugin

Apache License 2.0
243 stars 67 forks source link

gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3 #145

Open KirylMi opened 1 year ago

KirylMi commented 1 year ago

Hi.

I'm trying to install the userspace-cni-network-plugin on Ubuntu20 machine. It's clean, nothing else is installed, i'm running this ubuntu machine through VirtualBox.

I've installed go 1.11.10 I've installed vpp 22.02 version

After issuing

 export GOPATH=~/go
   export CNI_PATH=$GOPATH/src/github.com/containernetworking/plugins/bin
   cd $GOPATH/src/
   go get github.com/intel/userspace-cni-network-plugin
   cd github.com/intel/userspace-cni-network-plugin
   sudo make

(I also tried with GO111MODULE=on and without sudo, but with sudo it's better. During make i have this error:


  for package in cnivpp/api/* ; do cd $package ; pwd ; go generate ; cd - ; done
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
go: finding github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
go: finding github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d
go: finding github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1
go: finding github.com/go-ini/ini v1.25.4
go: finding github.com/jtolds/gls v4.20.0+incompatible
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: finding golang.org/x/tools v0.0.0-20190328211700-ab21143f2384
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
go: gotest.tools/v3@v3.0.2: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
go: gotest.tools/v3@v3.0.2: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
go: gotest.tools/v3@v3.0.2: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
go: finding gotest.tools/v3 v3.0.2
go: finding gotest.tools/v3 v3.0.3
go: gotest.tools/v3@v3.0.2: unknown revision gotest.tools/v3.0.2
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
go: gotest.tools/v3@v3.0.2: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
Fetching https://gotest.tools/v3?go-get=1
Parsing meta tags from https://gotest.tools/v3?go-get=1 (status code 200)
get "gotest.tools/v3": found meta tag get.metaImport{Prefix:"gotest.tools/v3", VCS:"git", RepoRoot:"https://github.com/gotestyourself/gotest.tools"} at https://gotest.tools/v3?go-get=1
go: finding gotest.tools/v3 v3.0.3
go: finding gotest.tools/v3 v3.0.2
go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3
go: gotest.tools/v3@v3.0.2: unknown revision gotest.tools/v3.0.2
go: error loading module requirements
make: *** [Makefile:116: build] Error 1

Without sudo it's


for package in cnivpp/api/* ; do cd $package ; pwd ; go generate ; cd - ; done
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
    /usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
bridge.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
    /usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
infra.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/interface
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
    /usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
interface.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/memif
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
    /usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
memif.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser
package go.fd.io/govpp/cmd/binapi-generator: cannot find package "go.fd.io/govpp/cmd/binapi-generator" in any of:
    /usr/local/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/cmd/binapi-generator (from $GOPATH)
vhostuser.go:20: running "go": exit status 1
/home/kiry/go/src/github.com/intel/userspace-cni-network-plugin
userspace.go:26:2: cannot find package "github.com/containernetworking/cni/pkg/invoke" in any of:
    /usr/local/go/src/github.com/containernetworking/cni/pkg/invoke (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/cni/pkg/invoke (from $GOPATH)
userspace.go:27:2: cannot find package "github.com/containernetworking/cni/pkg/skel" in any of:
    /usr/local/go/src/github.com/containernetworking/cni/pkg/skel (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/cni/pkg/skel (from $GOPATH)
userspace.go:28:2: cannot find package "github.com/containernetworking/cni/pkg/types" in any of:
    /usr/local/go/src/github.com/containernetworking/cni/pkg/types (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/cni/pkg/types (from $GOPATH)
userspace.go:29:2: cannot find package "github.com/containernetworking/cni/pkg/types/100" in any of:
    /usr/local/go/src/github.com/containernetworking/cni/pkg/types/100 (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/cni/pkg/types/100 (from $GOPATH)
userspace.go:30:2: cannot find package "github.com/containernetworking/cni/pkg/version" in any of:
    /usr/local/go/src/github.com/containernetworking/cni/pkg/version (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/cni/pkg/version (from $GOPATH)
userspace.go:31:2: cannot find package "github.com/containernetworking/plugins/pkg/ip" in any of:
    /usr/local/go/src/github.com/containernetworking/plugins/pkg/ip (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/plugins/pkg/ip (from $GOPATH)
userspace.go:32:2: cannot find package "github.com/containernetworking/plugins/pkg/ipam" in any of:
    /usr/local/go/src/github.com/containernetworking/plugins/pkg/ipam (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/plugins/pkg/ipam (from $GOPATH)
userspace.go:33:2: cannot find package "github.com/containernetworking/plugins/pkg/ns" in any of:
    /usr/local/go/src/github.com/containernetworking/plugins/pkg/ns (from $GOROOT)
    /home/kiry/go/src/github.com/containernetworking/plugins/pkg/ns (from $GOPATH)
../pkg/annotations/annotations.go:22:2: cannot find package "github.com/go-logfmt/logfmt" in any of:
    /usr/local/go/src/github.com/go-logfmt/logfmt (from $GOROOT)
    /home/kiry/go/src/github.com/go-logfmt/logfmt (from $GOPATH)
../cnivpp/api/interface/interface.go:26:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface" in any of:
    /usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface (from $GOROOT)
    /home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface (from $GOPATH)
../cnivpp/api/bridge/bridge.go:25:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface_types" in any of:
    /usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface_types (from $GOROOT)
    /home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interface_types (from $GOPATH)
../cnivpp/api/interface/interface.go:28:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/ip_types" in any of:
    /usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/ip_types (from $GOROOT)
    /home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/ip_types (from $GOPATH)
../cnivpp/api/bridge/bridge.go:26:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2" in any of:
    /usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2 (from $GOROOT)
    /home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2 (from $GOPATH)
../cnivpp/api/memif/memif.go:31:2: cannot find package "github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif" in any of:
    /usr/local/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif (from $GOROOT)
    /home/kiry/go/src/github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif (from $GOPATH)
../logging/logging.go:23:2: cannot find package "github.com/pkg/errors" in any of:
    /usr/local/go/src/github.com/pkg/errors (from $GOROOT)
    /home/kiry/go/src/github.com/pkg/errors (from $GOPATH)
../cnivpp/api/infra/infra.go:25:2: cannot find package "github.com/sirupsen/logrus" in any of:
    /usr/local/go/src/github.com/sirupsen/logrus (from $GOROOT)
    /home/kiry/go/src/github.com/sirupsen/logrus (from $GOPATH)
userspace.go:43:2: cannot find package "github.com/vishvananda/netlink" in any of:
    /usr/local/go/src/github.com/vishvananda/netlink (from $GOROOT)
    /home/kiry/go/src/github.com/vishvananda/netlink (from $GOPATH)
../cnivpp/api/infra/infra.go:27:2: cannot find package "go.fd.io/govpp" in any of:
    /usr/local/go/src/go.fd.io/govpp (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp (from $GOPATH)
../cnivpp/api/bridge/bridge.go:28:2: cannot find package "go.fd.io/govpp/api" in any of:
    /usr/local/go/src/go.fd.io/govpp/api (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/api (from $GOPATH)
../cnivpp/api/infra/infra.go:29:2: cannot find package "go.fd.io/govpp/core" in any of:
    /usr/local/go/src/go.fd.io/govpp/core (from $GOROOT)
    /home/kiry/go/src/go.fd.io/govpp/core (from $GOPATH)
../cniovs/cniovs.go:38:2: cannot find package "golang.org/x/sys/unix" in any of:
    /usr/local/go/src/golang.org/x/sys/unix (from $GOROOT)
    /home/kiry/go/src/golang.org/x/sys/unix (from $GOPATH)
../pkg/k8sclient/k8sclient.go:22:2: cannot find package "k8s.io/api/core/v1" in any of:
    /usr/local/go/src/k8s.io/api/core/v1 (from $GOROOT)
    /home/kiry/go/src/k8s.io/api/core/v1 (from $GOPATH)
../pkg/k8sclient/k8sclient.go:23:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
    /usr/local/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
    /home/kiry/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
../pkg/k8sclient/k8sclient.go:24:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
    /usr/local/go/src/k8s.io/client-go/kubernetes (from $GOROOT)
    /home/kiry/go/src/k8s.io/client-go/kubernetes (from $GOPATH)
../pkg/k8sclient/k8sclient.go:25:2: cannot find package "k8s.io/client-go/rest" in any of:
    /usr/local/go/src/k8s.io/client-go/rest (from $GOROOT)
    /home/kiry/go/src/k8s.io/client-go/rest (from $GOPATH)
../pkg/k8sclient/k8sclient.go:26:2: cannot find package "k8s.io/client-go/tools/clientcmd" in any of:
    /usr/local/go/src/k8s.io/client-go/tools/clientcmd (from $GOROOT)
    /home/kiry/go/src/k8s.io/client-go/tools/clientcmd (from $GOPATH)
../pkg/k8sclient/k8sclient.go:27:2: cannot find package "k8s.io/client-go/util/retry" in any of:
    /usr/local/go/src/k8s.io/client-go/util/retry (from $GOROOT)
    /home/kiry/go/src/k8s.io/client-go/util/retry (from $GOPATH)
make: *** [Makefile:116: build] Error 1

I would be glad to share with you more details in case you need them.

KirylMi commented 1 year ago

running make install gives the same error

johnoloughlin commented 1 year ago

This project was broken and I have made major changes to it. I will be updating the documentation when I get the ci running. userspace cni is now built in a container and copied out to the host with a deployment script. the container can be built with docker build . -f ./docker/userspacecni/Dockerfile -t userspacecni:latest I currently deploy userspace with

cat << EOF | kubectl apply -f -
---
apiVersion: v1
kind: Pod
metadata:
  name: userspacecni-$worker
  namespace: vpp
spec:
  nodeSelector:
    kubernetes.io/hostname: $worker
  containers:
  - name: userspacecni-$worker
    image: userspacecni:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: cni
      mountPath: /opt/cni/bin
  volumes:
    - name: cni
      hostPath:
        path: /opt/cni/bin
  restartPolicy: Never
EOF
KirylMi commented 1 year ago

This project was broken and I have made major changes to it. I will be updating the documentation when I get the ci running. userspace cni is now built in a container and copied out to the host with a deployment script. the container can be built with docker build . -f ./docker/userspacecni/Dockerfile -t userspacecni:latest I currently deploy userspace with

cat << EOF | kubectl apply -f -
---
apiVersion: v1
kind: Pod
metadata:
  name: userspacecni-$worker
  namespace: vpp
spec:
  nodeSelector:
    kubernetes.io/hostname: $worker
  containers:
  - name: userspacecni-$worker
    image: userspacecni:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: cni
      mountPath: /opt/cni/bin
  volumes:
    - name: cni
      hostPath:
        path: /opt/cni/bin
  restartPolicy: Never
EOF

Thank you for the reply!

I assume the current guide on setting up everything won't work with the container approach?