Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Timeout field #34

Open
dmytroleonenko opened this issue May 10, 2019 · 4 comments
Open

Build fails on Timeout field #34

dmytroleonenko opened this issue May 10, 2019 · 4 comments

Comments

@dmytroleonenko
Copy link

cmd/consul-registration-hook/main.go:52:7: unknown field 'Timeout' in struct literal of type k8s.ServiceProvider
make[1]: *** [build] Error 2
make: *** [build-linux] Error 2
@dmytroleonenko
Copy link
Author

in general, I see a lot of timeouts if I remove the line mentioned and build

in Pod "mypodname(4c1b0a44-734d-11e9-82c9-0613e7e9b578)" failed - error: command '/bin/sh -c /usr/local/bin/consul-registration-hook register k8s' exited with 1: 2019/05/10 17:59:08 consul-registration-hook (version: v0.1.4-1-g3ea4a28)
2019/05/10 17:59:08 Registering services using data from Kubernetes API
2019/05/10 17:59:38 error getting services to register: unable to get pod data from API: unable to get pod data from API: performing request: Get https://10.97.160.1:443/api/v1/namespaces/system/pods/mypodname: dial tcp 10.97.160.1:443: i/o timeout
, message: "2019/05/10 17:59:08 consul-registration-hook (version: v0.1.4-1-g3ea4a28)\n2019/05/10 17:59:08 Registering services using data from Kubernetes API\n2019/05/10 17:59:38 error getting services to register: unable to get pod data from API: unable to get pod data from API: performing request: Get https://10.97.160.1:443/api/v1/namespaces/system/pods/mypodname: dial tcp 10.97.160.1:443: i/o timeout\n"
  Warning  FailedPreStopHook  11m  kubelet, ip-10-97-1-53.us-west-1.compute.internal  Exec lifecycle hook ([/bin/sh -c /usr/local/bin/consul-registration-hook deregister k8s]) for Container "mypodname" in Pod "mypodname(4c1b0a44-734d-11e9-82c9-0613e7e9b578)" failed - error: command '/bin/sh -c /usr/local/bin/consul-registration-hook deregister k8s' exited with 1: 2019/05/10 17:59:38 consul-registration-hook (version: v0.1.4-1-g3ea4a28)
2019/05/10 17:59:38 Deregistering services using data from Kubernetes API
2019/05/10 18:00:08 error getting services to deregister: unable to get pod data from API: unable to get pod data from API: performing request: Get https://10.97.160.1:443/api/v1/namespaces/system/pods/mypodname: dial tcp 10.97.160.1:443: i/o timeout
, message: "2019/05/10 17:59:38 consul-registration-hook (version: v0.1.4-1-g3ea4a28)\n2019/05/10 17:59:38 Deregistering services using data from Kubernetes API\n2019/05/10 18:00:08 error getting services to deregister: unable to get pod data from API: unable to get pod data from API: performing request: Get https://10.97.160.1:443/api/v1/namespaces/system/pods/mypodname: dial tcp 10.97.160.1:443: i/o timeout\n"

@AlfredBroda
Copy link
Contributor

Strange, Travis builds are passing and Timeout is defined in k8s/provider.go - I guess it defaults to 0, hence errors you got.
@dmytroleonenko are you sure you are running build on a clean tree from master?

Timeout time.Duration

@dmytroleonenko
Copy link
Author

reason being the dependency on the released v0.1.4 tag that doesn't have this change

@dmytroleonenko
Copy link
Author

Strange, Travis builds are passing and Timeout is defined in k8s/provider.go - I guess it defaults to 0, hence errors you got.
@dmytroleonenko are you sure you are running build on a clean tree from master?

Timeout time.Duration

Once I do dep ensure I see that in vendor for consul-registration-hook there is no Timeout definition because dep fetches the latest release for me and it is 0.14 while Timeout was added only in the master branch and never got into the release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants