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

no such host error when running HelmBasicExampleDeployment test #1174

Open
HotThoughts opened this issue Sep 15, 2022 · 0 comments · May be fixed by #1175
Open

no such host error when running HelmBasicExampleDeployment test #1174

HotThoughts opened this issue Sep 15, 2022 · 0 comments · May be fixed by #1175
Labels
bug Something isn't working p:needs triage Needs to be processed by maintainer and issue type / priority added

Comments

@HotThoughts
Copy link

Hello, I am learning terratest and observed a bug in the helm integration test example.

The error is

retry.go:103: HTTP GET to URL http://ct-control-plane:31166 returned an error: Get "http://ct-control-plane:31166": dial tcp: lookup ct-control-plane: no such host. Sleeping for 10s and will try again.

Seems the host is not accessible from outside of the cluster.

Full error:

terratest/test ❯ go test -v -tags helm -run TestHelmBasicExampleDeployment
=== RUN   TestHelmBasicExampleDeployment
=== PAUSE TestHelmBasicExampleDeployment
=== CONT  TestHelmBasicExampleDeployment
TestHelmBasicExampleDeployment 2022-09-15T19:23:51+02:00 client.go:42: Configuring Kubernetes client using config file /var/folders/hv/kf854hhd61nd_9sdl6xh3h8c0000gn/T/kubie-configweXSZz.yaml with context 
TestHelmBasicExampleDeployment 2022-09-15T19:23:51+02:00 logger.go:66: Running command helm with args [install --namespace helm-basic-example-t5v8qs --set containerImageRepo=nginx --set containerImageTag=1.15.8 nginx-service-hepbl3 /Users/ywei/repos/terratest/examples/helm-basic-example]
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 logger.go:66: NAME: nginx-service-hepbl3
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 logger.go:66: LAST DEPLOYED: Thu Sep 15 19:23:52 2022
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 logger.go:66: NAMESPACE: helm-basic-example-t5v8qs
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 logger.go:66: STATUS: deployed
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 logger.go:66: REVISION: 1
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 logger.go:66: TEST SUITE: None
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 retry.go:91: Wait for service nginx-service-hepbl3-helm-basic-example to be provisioned.
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 client.go:42: Configuring Kubernetes client using config file /var/folders/hv/kf854hhd61nd_9sdl6xh3h8c0000gn/T/kubie-configweXSZz.yaml with context 
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 node.go:33: Getting list of nodes from Kubernetes
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 client.go:42: Configuring Kubernetes client using config file /var/folders/hv/kf854hhd61nd_9sdl6xh3h8c0000gn/T/kubie-configweXSZz.yaml with context 
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 service.go:86: Service is now available
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 client.go:42: Configuring Kubernetes client using config file /var/folders/hv/kf854hhd61nd_9sdl6xh3h8c0000gn/T/kubie-configweXSZz.yaml with context 
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 node.go:33: Getting list of nodes from Kubernetes
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 client.go:42: Configuring Kubernetes client using config file /var/folders/hv/kf854hhd61nd_9sdl6xh3h8c0000gn/T/kubie-configweXSZz.yaml with context 
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 retry.go:91: HTTP GET to URL http://ct-control-plane:31166
TestHelmBasicExampleDeployment 2022-09-15T19:23:52+02:00 http_helper.go:59: Making an HTTP GET call to URL http://ct-control-plane:31166
TestHelmBasicExampleDeployment 2022-09-15T19:23:53+02:00 retry.go:103: HTTP GET to URL http://ct-control-plane:31166 returned an error: Get "http://ct-control-plane:31166": dial tcp: lookup ct-control-plane: no such host. Sleeping for 10s and will try again.
TestHelmBasicExampleDeployment 2022-09-15T19:24:03+02:00 retry.go:91: HTTP GET to URL http://ct-control-plane:31166
TestHelmBasicExampleDeployment 2022-09-15T19:24:03+02:00 http_helper.go:59: Making an HTTP GET call to URL http://ct-control-plane:31166
TestHelmBasicExampleDeployment 2022-09-15T19:24:03+02:00 retry.go:103: HTTP GET to URL http://ct-control-plane:31166 returned an error: Get "http://ct-control-plane:31166": dial tcp: lookup ct-control-plane: no such host. Sleeping for 10s and will try again.
^Csignal: interrupt
FAIL	github.com/gruntwork-io/terratest/test	18.659s

To reproduce, following:

cd test
go mod tidy
go test -v -tags helm -run TestHelmBasicExampleDeployment
@HotThoughts HotThoughts linked a pull request Sep 15, 2022 that will close this issue
4 tasks
@denis256 denis256 added bug Something isn't working p:needs triage Needs to be processed by maintainer and issue type / priority added labels Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p:needs triage Needs to be processed by maintainer and issue type / priority added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants