kubernetes-retired / external-storage

[EOL] External storage plugins, provisioners, and helper libraries
Apache License 2.0
2.7k stars 1.6k forks source link

Cannot build hostpath provisionner #198

Closed metal3d closed 7 years ago

metal3d commented 7 years ago

Hi, An error appears while I try to build hostPath provisionner:

CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o hostpath-provisioner .
hostpath-provisioner.go:27:2: cannot find package "github.com/kubernetes-incubator/external-storage/lib/controller" in any of:
    /home/pafer/go/src/github.com/kubernetes-incubator/external-storage/lib/controller (from $GOROOT)
    /home/pafer/Projects/goprojects/src/github.com/kubernetes-incubator/external-storage/lib/controller (from $GOPATH)
hostpath-provisioner.go:28:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
    /home/pafer/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
hostpath-provisioner.go:29:2: cannot find package "k8s.io/apimachinery/pkg/util/wait" in any of:
    /home/pafer/go/src/k8s.io/apimachinery/pkg/util/wait (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/apimachinery/pkg/util/wait (from $GOPATH)
hostpath-provisioner.go:30:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
    /home/pafer/go/src/k8s.io/client-go/kubernetes (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/client-go/kubernetes (from $GOPATH)
hostpath-provisioner.go:31:2: cannot find package "k8s.io/client-go/pkg/api/v1" in any of:
    /home/pafer/go/src/k8s.io/client-go/pkg/api/v1 (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/client-go/pkg/api/v1 (from $GOPATH)
hostpath-provisioner.go:32:2: cannot find package "k8s.io/client-go/rest" in any of:
    /home/pafer/go/src/k8s.io/client-go/rest (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/client-go/rest (from $GOPATH)
Makefile:23: recipe for target 'hostpath-provisioner' failed
make: *** [hostpath-provisioner] Error 1

Tried with go 1.7.5 and go 1.8.3, same result.

Any help can be appreciated

wongma7 commented 7 years ago

Did you run glide install -v in the hostpath-provisioner directory first? client-go and apimachinery are quite unstable so we use glide to fix our dependency on specific older versions

metal3d commented 7 years ago

Yes I did it.

What I cannot understand is why I doesn't see any reference of vendor directory while go is searching libraries.

Here are the full logs:

~/Projects/Lab/external-storage  cd docs/demo/hostpath-provisioner/
 ~/Projects/Lab/external-storage/docs/demo/hostpath-provisioner  glide install -v

[WARN]  The name listed in the config file (github.com/kubernetes-incubator/external-storage/docs/demo/hostpath-provisioner) does not match the current location (.)
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Found desired version locally github.com/davecgh/go-spew 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d!
[INFO]  --> Found desired version locally github.com/docker/distribution cd27f179f2c10c5d300e6d09025b538c475b0d51!
[INFO]  --> Found desired version locally github.com/emicklei/go-restful 09691a3b6378b740595c1002f40c34dd5f218a22!
[INFO]  --> Found desired version locally github.com/ghodss/yaml 73d445a93680fa1a78ae23a5839bad48f32ba1ee!
[INFO]  --> Found desired version locally github.com/go-openapi/jsonpointer 46af16f9f7b149af66e5d1bd010e3574dc06de98!
[INFO]  --> Found desired version locally github.com/go-openapi/jsonreference 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272!
[INFO]  --> Found desired version locally github.com/go-openapi/spec 6aced65f8501fe1217321abf0749d354824ba2ff!
[INFO]  --> Found desired version locally github.com/go-openapi/swag 1d0bd113de87027671077d3c71eb3ac5d7dbba72!
[INFO]  --> Found desired version locally github.com/gogo/protobuf e18d7aa8f8c624c915db340349aad4c49b10d173!
[INFO]  --> Found desired version locally github.com/golang/glog 44145f04b68cf362d9c4df2182967c2275eaefed!
[INFO]  --> Found desired version locally github.com/golang/groupcache 02826c3e79038b59d737d3b1c0a1d937f71a4433!
[INFO]  --> Found desired version locally github.com/google/gofuzz 44d81051d367757e1c7c6a5a86423ece9afcf63c!
[INFO]  --> Found desired version locally github.com/juju/ratelimit 77ed1c8a01217656d2080ad51981f6e99adaa177!
[INFO]  --> Found desired version locally github.com/kubernetes-incubator/external-storage c5e69a02cc1f9db5171efbac7284ee6f3cc0c49f!
[INFO]  --> Found desired version locally github.com/mailru/easyjson d5b7844b561a7bc640052f1b935f7b800330d7e0!
[INFO]  --> Found desired version locally github.com/pborman/uuid ca53cad383cad2479bbba7f7a1a05797ec1386e4!
[INFO]  --> Found desired version locally github.com/PuerkitoBio/purell 8a290539e2e8629dbc4e6bad948158f790ec31f4!
[INFO]  --> Found desired version locally github.com/PuerkitoBio/urlesc 5bd2802263f21d8788851d5305584c82a5c75d7e!
[INFO]  --> Found desired version locally github.com/spf13/pflag 9ff6c6923cfffbcd502984b8e0c80539a94968b7!
[INFO]  --> Found desired version locally github.com/ugorji/go ded73eae5db7e7a0ef6f55aace87a2873c5d2b74!
[INFO]  --> Found desired version locally golang.org/x/net e90d6d0afc4c315a0d87a568ae68577cc15149a0!
[INFO]  --> Found desired version locally golang.org/x/text 2910a502d2bf9e43193af9d68ca516529614eed3!
[INFO]  --> Found desired version locally gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4!
[INFO]  --> Found desired version locally gopkg.in/yaml.v2 53feefa2559fb8dfa8d81baad31be332c97d6c77!
[INFO]  --> Found desired version locally k8s.io/apimachinery c1c4a7fe832857c75cc1d79c8e40d71d5da15fc6!
[INFO]  --> Found desired version locally k8s.io/client-go 76153773eaa3a268131d3d993290a194a1370585!
[INFO]  --> Found desired version locally k8s.io/kubernetes fff5156092b56e6bd60fff75aad4dc9de6b6ef37!
[INFO]  Setting references.
[INFO]  --> Setting version for github.com/PuerkitoBio/purell to 8a290539e2e8629dbc4e6bad948158f790ec31f4.
[INFO]  --> Setting version for github.com/ugorji/go to ded73eae5db7e7a0ef6f55aace87a2873c5d2b74.
[INFO]  --> Setting version for github.com/kubernetes-incubator/external-storage to c5e69a02cc1f9db5171efbac7284ee6f3cc0c49f.
[INFO]  --> Setting version for github.com/gogo/protobuf to e18d7aa8f8c624c915db340349aad4c49b10d173.
[INFO]  --> Setting version for github.com/davecgh/go-spew to 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d.
[INFO]  --> Setting version for github.com/PuerkitoBio/urlesc to 5bd2802263f21d8788851d5305584c82a5c75d7e.
[INFO]  --> Setting version for github.com/go-openapi/swag to 1d0bd113de87027671077d3c71eb3ac5d7dbba72.
[INFO]  --> Setting version for github.com/pborman/uuid to ca53cad383cad2479bbba7f7a1a05797ec1386e4.
[INFO]  --> Setting version for github.com/spf13/pflag to 9ff6c6923cfffbcd502984b8e0c80539a94968b7.
[INFO]  --> Setting version for github.com/emicklei/go-restful to 09691a3b6378b740595c1002f40c34dd5f218a22.
[INFO]  --> Setting version for github.com/mailru/easyjson to d5b7844b561a7bc640052f1b935f7b800330d7e0.
[INFO]  --> Setting version for github.com/juju/ratelimit to 77ed1c8a01217656d2080ad51981f6e99adaa177.
[INFO]  --> Setting version for github.com/google/gofuzz to 44d81051d367757e1c7c6a5a86423ece9afcf63c.
[INFO]  --> Setting version for github.com/go-openapi/jsonpointer to 46af16f9f7b149af66e5d1bd010e3574dc06de98.
[INFO]  --> Setting version for github.com/go-openapi/jsonreference to 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272.
[INFO]  --> Setting version for github.com/ghodss/yaml to 73d445a93680fa1a78ae23a5839bad48f32ba1ee.
[INFO]  --> Setting version for github.com/golang/groupcache to 02826c3e79038b59d737d3b1c0a1d937f71a4433.
[INFO]  --> Setting version for github.com/docker/distribution to cd27f179f2c10c5d300e6d09025b538c475b0d51.
[INFO]  --> Setting version for github.com/golang/glog to 44145f04b68cf362d9c4df2182967c2275eaefed.
[INFO]  --> Setting version for github.com/go-openapi/spec to 6aced65f8501fe1217321abf0749d354824ba2ff.
[INFO]  --> Setting version for golang.org/x/net to e90d6d0afc4c315a0d87a568ae68577cc15149a0.
[INFO]  --> Setting version for golang.org/x/text to 2910a502d2bf9e43193af9d68ca516529614eed3.
[INFO]  --> Setting version for gopkg.in/inf.v0 to 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4.
[INFO]  --> Setting version for gopkg.in/yaml.v2 to 53feefa2559fb8dfa8d81baad31be332c97d6c77.
[INFO]  --> Setting version for k8s.io/apimachinery to c1c4a7fe832857c75cc1d79c8e40d71d5da15fc6.
[INFO]  --> Setting version for k8s.io/client-go to 76153773eaa3a268131d3d993290a194a1370585.
[INFO]  --> Setting version for k8s.io/kubernetes to fff5156092b56e6bd60fff75aad4dc9de6b6ef37.
[INFO]  Exporting resolved dependencies...
[INFO]  --> Exporting github.com/go-openapi/spec
[INFO]  --> Exporting github.com/ghodss/yaml
[INFO]  --> Exporting github.com/emicklei/go-restful
[INFO]  --> Exporting github.com/go-openapi/jsonreference
[INFO]  --> Exporting github.com/go-openapi/jsonpointer
[INFO]  --> Exporting github.com/go-openapi/swag
[INFO]  --> Exporting github.com/docker/distribution
[INFO]  --> Exporting github.com/golang/glog
[INFO]  --> Exporting github.com/google/gofuzz
[INFO]  --> Exporting github.com/golang/groupcache
[INFO]  --> Exporting github.com/juju/ratelimit
[INFO]  --> Exporting github.com/PuerkitoBio/purell
[INFO]  --> Exporting github.com/spf13/pflag
[INFO]  --> Exporting github.com/pborman/uuid
[INFO]  --> Exporting github.com/ugorji/go
[INFO]  --> Exporting github.com/gogo/protobuf
[INFO]  --> Exporting github.com/kubernetes-incubator/external-storage
[INFO]  --> Exporting github.com/mailru/easyjson
[INFO]  --> Exporting github.com/davecgh/go-spew
[INFO]  --> Exporting github.com/PuerkitoBio/urlesc
[INFO]  --> Exporting golang.org/x/text
[INFO]  --> Exporting golang.org/x/net
[INFO]  --> Exporting gopkg.in/inf.v0
[INFO]  --> Exporting gopkg.in/yaml.v2
[INFO]  --> Exporting k8s.io/apimachinery
[INFO]  --> Exporting k8s.io/client-go
[INFO]  --> Exporting k8s.io/kubernetes
[INFO]  Replacing existing vendor dependencies
[INFO]  Removing nested vendor and Godeps/_workspace directories...
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/github.com/docker/distribution/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/github.com/kubernetes-incubator/external-storage/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/k8s.io/apimachinery/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/k8s.io/client-go/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/k8s.io/kubernetes/vendor

 ~/Projects/Lab/external-storage/docs/demo/hostpath-provisioner  make
glide install -v --strip-vcs
[WARN]  The --strip-vcs flag is deprecated. This now works by default.
[WARN]  The name listed in the config file (github.com/kubernetes-incubator/external-storage/docs/demo/hostpath-provisioner) does not match the current location (.)
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Found desired version locally github.com/davecgh/go-spew 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d!
[INFO]  --> Found desired version locally github.com/docker/distribution cd27f179f2c10c5d300e6d09025b538c475b0d51!
[INFO]  --> Found desired version locally github.com/emicklei/go-restful 09691a3b6378b740595c1002f40c34dd5f218a22!
[INFO]  --> Found desired version locally github.com/ghodss/yaml 73d445a93680fa1a78ae23a5839bad48f32ba1ee!
[INFO]  --> Found desired version locally github.com/go-openapi/jsonpointer 46af16f9f7b149af66e5d1bd010e3574dc06de98!
[INFO]  --> Found desired version locally github.com/go-openapi/jsonreference 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272!
[INFO]  --> Found desired version locally github.com/go-openapi/spec 6aced65f8501fe1217321abf0749d354824ba2ff!
[INFO]  --> Found desired version locally github.com/go-openapi/swag 1d0bd113de87027671077d3c71eb3ac5d7dbba72!
[INFO]  --> Found desired version locally github.com/gogo/protobuf e18d7aa8f8c624c915db340349aad4c49b10d173!
[INFO]  --> Found desired version locally github.com/golang/glog 44145f04b68cf362d9c4df2182967c2275eaefed!
[INFO]  --> Found desired version locally github.com/golang/groupcache 02826c3e79038b59d737d3b1c0a1d937f71a4433!
[INFO]  --> Found desired version locally github.com/google/gofuzz 44d81051d367757e1c7c6a5a86423ece9afcf63c!
[INFO]  --> Found desired version locally github.com/juju/ratelimit 77ed1c8a01217656d2080ad51981f6e99adaa177!
[INFO]  --> Found desired version locally github.com/kubernetes-incubator/external-storage c5e69a02cc1f9db5171efbac7284ee6f3cc0c49f!
[INFO]  --> Found desired version locally github.com/mailru/easyjson d5b7844b561a7bc640052f1b935f7b800330d7e0!
[INFO]  --> Found desired version locally github.com/pborman/uuid ca53cad383cad2479bbba7f7a1a05797ec1386e4!
[INFO]  --> Found desired version locally github.com/PuerkitoBio/purell 8a290539e2e8629dbc4e6bad948158f790ec31f4!
[INFO]  --> Found desired version locally github.com/PuerkitoBio/urlesc 5bd2802263f21d8788851d5305584c82a5c75d7e!
[INFO]  --> Found desired version locally github.com/spf13/pflag 9ff6c6923cfffbcd502984b8e0c80539a94968b7!
[INFO]  --> Found desired version locally github.com/ugorji/go ded73eae5db7e7a0ef6f55aace87a2873c5d2b74!
[INFO]  --> Found desired version locally golang.org/x/net e90d6d0afc4c315a0d87a568ae68577cc15149a0!
[INFO]  --> Found desired version locally golang.org/x/text 2910a502d2bf9e43193af9d68ca516529614eed3!
[INFO]  --> Found desired version locally gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4!
[INFO]  --> Found desired version locally gopkg.in/yaml.v2 53feefa2559fb8dfa8d81baad31be332c97d6c77!
[INFO]  --> Found desired version locally k8s.io/apimachinery c1c4a7fe832857c75cc1d79c8e40d71d5da15fc6!
[INFO]  --> Found desired version locally k8s.io/client-go 76153773eaa3a268131d3d993290a194a1370585!
[INFO]  --> Found desired version locally k8s.io/kubernetes fff5156092b56e6bd60fff75aad4dc9de6b6ef37!
[INFO]  Setting references.
[INFO]  --> Setting version for github.com/golang/glog to 44145f04b68cf362d9c4df2182967c2275eaefed.
[INFO]  --> Setting version for github.com/ugorji/go to ded73eae5db7e7a0ef6f55aace87a2873c5d2b74.
[INFO]  --> Setting version for github.com/spf13/pflag to 9ff6c6923cfffbcd502984b8e0c80539a94968b7.
[INFO]  --> Setting version for github.com/go-openapi/swag to 1d0bd113de87027671077d3c71eb3ac5d7dbba72.
[INFO]  --> Setting version for github.com/PuerkitoBio/purell to 8a290539e2e8629dbc4e6bad948158f790ec31f4.
[INFO]  --> Setting version for github.com/docker/distribution to cd27f179f2c10c5d300e6d09025b538c475b0d51.
[INFO]  --> Setting version for github.com/go-openapi/jsonpointer to 46af16f9f7b149af66e5d1bd010e3574dc06de98.
[INFO]  --> Setting version for github.com/PuerkitoBio/urlesc to 5bd2802263f21d8788851d5305584c82a5c75d7e.
[INFO]  --> Setting version for github.com/go-openapi/jsonreference to 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272.
[INFO]  --> Setting version for github.com/juju/ratelimit to 77ed1c8a01217656d2080ad51981f6e99adaa177.
[INFO]  --> Setting version for github.com/gogo/protobuf to e18d7aa8f8c624c915db340349aad4c49b10d173.
[INFO]  --> Setting version for github.com/mailru/easyjson to d5b7844b561a7bc640052f1b935f7b800330d7e0.
[INFO]  --> Setting version for github.com/google/gofuzz to 44d81051d367757e1c7c6a5a86423ece9afcf63c.
[INFO]  --> Setting version for github.com/emicklei/go-restful to 09691a3b6378b740595c1002f40c34dd5f218a22.
[INFO]  --> Setting version for github.com/davecgh/go-spew to 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d.
[INFO]  --> Setting version for github.com/golang/groupcache to 02826c3e79038b59d737d3b1c0a1d937f71a4433.
[INFO]  --> Setting version for github.com/pborman/uuid to ca53cad383cad2479bbba7f7a1a05797ec1386e4.
[INFO]  --> Setting version for github.com/ghodss/yaml to 73d445a93680fa1a78ae23a5839bad48f32ba1ee.
[INFO]  --> Setting version for github.com/go-openapi/spec to 6aced65f8501fe1217321abf0749d354824ba2ff.
[INFO]  --> Setting version for github.com/kubernetes-incubator/external-storage to c5e69a02cc1f9db5171efbac7284ee6f3cc0c49f.
[INFO]  --> Setting version for golang.org/x/net to e90d6d0afc4c315a0d87a568ae68577cc15149a0.
[INFO]  --> Setting version for golang.org/x/text to 2910a502d2bf9e43193af9d68ca516529614eed3.
[INFO]  --> Setting version for gopkg.in/inf.v0 to 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4.
[INFO]  --> Setting version for k8s.io/apimachinery to c1c4a7fe832857c75cc1d79c8e40d71d5da15fc6.
[INFO]  --> Setting version for gopkg.in/yaml.v2 to 53feefa2559fb8dfa8d81baad31be332c97d6c77.
[INFO]  --> Setting version for k8s.io/client-go to 76153773eaa3a268131d3d993290a194a1370585.
[INFO]  --> Setting version for k8s.io/kubernetes to fff5156092b56e6bd60fff75aad4dc9de6b6ef37.
[INFO]  Exporting resolved dependencies...
[INFO]  --> Exporting github.com/davecgh/go-spew
[INFO]  --> Exporting github.com/ghodss/yaml
[INFO]  --> Exporting github.com/go-openapi/swag
[INFO]  --> Exporting github.com/emicklei/go-restful
[INFO]  --> Exporting github.com/docker/distribution
[INFO]  --> Exporting github.com/ugorji/go
[INFO]  --> Exporting github.com/go-openapi/jsonpointer
[INFO]  --> Exporting github.com/kubernetes-incubator/external-storage
[INFO]  --> Exporting github.com/juju/ratelimit
[INFO]  --> Exporting github.com/google/gofuzz
[INFO]  --> Exporting github.com/spf13/pflag
[INFO]  --> Exporting github.com/go-openapi/jsonreference
[INFO]  --> Exporting github.com/golang/groupcache
[INFO]  --> Exporting github.com/golang/glog
[INFO]  --> Exporting github.com/gogo/protobuf
[INFO]  --> Exporting github.com/PuerkitoBio/purell
[INFO]  --> Exporting github.com/PuerkitoBio/urlesc
[INFO]  --> Exporting github.com/pborman/uuid
[INFO]  --> Exporting github.com/mailru/easyjson
[INFO]  --> Exporting github.com/go-openapi/spec
[INFO]  --> Exporting golang.org/x/text
[INFO]  --> Exporting golang.org/x/net
[INFO]  --> Exporting gopkg.in/inf.v0
[INFO]  --> Exporting gopkg.in/yaml.v2
[INFO]  --> Exporting k8s.io/apimachinery
[INFO]  --> Exporting k8s.io/kubernetes
[INFO]  --> Exporting k8s.io/client-go
[INFO]  Replacing existing vendor dependencies
[INFO]  Removing nested vendor and Godeps/_workspace directories...
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/github.com/docker/distribution/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/github.com/kubernetes-incubator/external-storage/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/k8s.io/apimachinery/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/k8s.io/client-go/vendor
[INFO]  Removing: /home/pafer/Projects/Lab/external-storage/docs/demo/hostpath-provisioner/vendor/k8s.io/kubernetes/vendor
CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o hostpath-provisioner .
hostpath-provisioner.go:26:2: cannot find package "github.com/golang/glog" in any of:
    /home/pafer/go/src/github.com/golang/glog (from $GOROOT)
    /home/pafer/Projects/goprojects/src/github.com/golang/glog (from $GOPATH)
hostpath-provisioner.go:27:2: cannot find package "github.com/kubernetes-incubator/external-storage/lib/controller" in any of:
    /home/pafer/go/src/github.com/kubernetes-incubator/external-storage/lib/controller (from $GOROOT)
    /home/pafer/Projects/goprojects/src/github.com/kubernetes-incubator/external-storage/lib/controller (from $GOPATH)
hostpath-provisioner.go:28:2: cannot find package "k8s.io/apimachinery/pkg/apis/meta/v1" in any of:
    /home/pafer/go/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/apimachinery/pkg/apis/meta/v1 (from $GOPATH)
hostpath-provisioner.go:29:2: cannot find package "k8s.io/apimachinery/pkg/util/wait" in any of:
    /home/pafer/go/src/k8s.io/apimachinery/pkg/util/wait (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/apimachinery/pkg/util/wait (from $GOPATH)
hostpath-provisioner.go:30:2: cannot find package "k8s.io/client-go/kubernetes" in any of:
    /home/pafer/go/src/k8s.io/client-go/kubernetes (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/client-go/kubernetes (from $GOPATH)
hostpath-provisioner.go:31:2: cannot find package "k8s.io/client-go/pkg/api/v1" in any of:
    /home/pafer/go/src/k8s.io/client-go/pkg/api/v1 (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/client-go/pkg/api/v1 (from $GOPATH)
hostpath-provisioner.go:32:2: cannot find package "k8s.io/client-go/rest" in any of:
    /home/pafer/go/src/k8s.io/client-go/rest (from $GOROOT)
    /home/pafer/Projects/goprojects/src/k8s.io/client-go/rest (from $GOPATH)
Makefile:23 : la recette pour la cible « hostpath-provisioner » a échouée
make: *** [hostpath-provisioner] Erreur 1

Anyway, I'm wondering if I should use docs/demo/hostpath-provisioner or the local-volume...

metal3d commented 7 years ago

BTW:

glide get github.com/golang/glog
[WARN]  The name listed in the config file (github.com/kubernetes-incubator/external-storage) does not match the current location (.)
[INFO]  Preparing to install 1 package.
[INFO]  Attempting to get package github.com/golang/glog
[WARN]  --> Package "github.com/golang/glog" is already in glide.yaml. Skipping
[WARN]  Nothing to do

ll vendor/github.com/golang/glog
total 76
drwxr-xr-x. 2 pafer pafer  4096 26 juin  17:21 .
drwxr-xr-x. 4 pafer pafer  4096 26 juin  17:21 ..
-rw-rw-r--. 1 pafer pafer  3323 26 juin  17:21 glog_file.go
-rw-rw-r--. 1 pafer pafer 36277 26 juin  17:21 glog.go
-rw-rw-r--. 1 pafer pafer 11439 26 juin  17:21 glog_test.go
-rw-rw-r--. 1 pafer pafer 10273 26 juin  17:21 LICENSE
metal3d commented 7 years ago

My god... forget my bug... the "glide get" command gave me the problem, I wasn't at the right place. I needed to get project in GOPATH/src

My apologies

wongma7 commented 7 years ago

Ah it is because external-storage must be in your GOPATH for the "vendor" stuff to work. Go won't bother to look for ./vendor unless you're working in a descendent of GOPATH. (Dumb I know).

The hostpath provisioner is intended to be a barebones toy demo (hence forcing people to build it to use it, etc.) that will only work properly on single-node clusters. Local-volume will be the way to go for local storage but is alpha in 1.7 only.

metal3d commented 7 years ago

yeah, I realized that it can only work on a single node installation later ;)

And that's very ennoying that local-volume only works on 1.7 only, I'm using openshift 1.5.1 that incluse k8s 1.5 :\

So, that means that I will not be able to have Galera with hostpath on our cluster :(