mhausenblas / reshifter

Kubernetes cluster state management
https://hackernoon.com/introducing-reshifter-for-kubernetes-backup-restore-migration-upgrade-ffaf78da36
Apache License 2.0
294 stars 30 forks source link

Cannot build from source: undefined: tls.CertificateRequestInfo #5

Closed dohnto closed 7 years ago

dohnto commented 7 years ago

In order to debug #2 I tried to build reshifter from source, following dev.md document.

You can reproduce my build by running:

# in reshifter directory
$ git rev-parse HEAD
3088d324f4e2bd545662673999160bd8aab56604
$ docker run -it -v $PWD:/go/src/github.com/mhausenblas/reshifter debian:stretch
$  docker run -it -v $PWD:/go/src/github.com/mhausenblas/reshifter -w /go/src/github.com/mhausenblas/reshifter -e GOPATH=/go debian:stretch
# inside docker cointainer
$ apt-get update
$ apt-get install -y golang git make
$ go get -u github.com/golang/dep/cmd/dep
$ /go/bin/dep ensure
$ make gbuild
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.releaseVersion=0.3.13" .
# mhausenblas/reshifter/vendor/github.com/coreos/etcd/pkg/transport
vendor/github.com/coreos/etcd/pkg/transport/listener.go:180: cfg.GetClientCertificate undefined (type *tls.Config has no field or method GetClientCertificate)
vendor/github.com/coreos/etcd/pkg/transport/listener.go:180: undefined: tls.CertificateRequestInfo
vendor/github.com/coreos/etcd/pkg/transport/listener_tls.go:151: undefined: net.DefaultResolver in net.DefaultResolver.LookupHost
Makefile:15: recipe for target 'gbuild' failed
make: *** [gbuild] Error 2

EDIT: updated the code to improve compaction NOTE: I haven't developed in golang lately so maybe missing something obvious... but maybe it can be included in dev.md

Thanks!

mhausenblas commented 7 years ago

@dohnto oh wow, thanks a lot for doing this, I so much appreciate it!! Will try to figure out what the problem is here ASAP (note: I'm developing on macOS, never tried what you did above).

mhausenblas commented 7 years ago

Hmmm, still struggling with this. Might need to reach out to the dep team to see if they've got an idea.

mhausenblas commented 7 years ago

As the awesome @carolynvs from the dep team rightly pointed out (thanks, again!!) the root problem here is that the Go version in the Docker image is out of date (v1.7, where I'm using v1.8). This should fix this issue, can you try and confirm please, @dohnto?

mhausenblas commented 7 years ago

Can I close this one @dohnto?

mhausenblas commented 7 years ago

OK, @dohnto I think I'm gonna close this one for now, if the issue persists, happy to re-open it.

dohnto commented 7 years ago

Yes, golang 1.8 fixed this one for me.