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

Add DNS status check #160

Closed
wants to merge 1 commit into from
Closed

Conversation

lilic
Copy link
Contributor

@lilic lilic commented Apr 5, 2018

Sometimes DNS is not configured correctly, mainly on minikube
Kubernetes clusters. This checks that the DNS deployment has all
the running pods, if not it errors out and suggests to the user
to correctly setup DNS.

Fixes #158

Notes:

  • I exit rather than just output the error, I noticed in the case of when GKE setup fails you just notify the user but do not abort, not sure which is the correct approach here?
  • Was not sure if we should leave a suggestion on how the user should fix this? If so, which of the two options from the issue should we suggest?

Sometimes DNS is not configured correctly, mainly on minikube
Kubernetes clusters. This checks that the DNS deployment has all
the running pods, if not it errors out and suggests to the user
to correctly setup DNS.
// We exit if the DNS pods are not up and running, as the installer needs to be
// able to connect to the server to correctly setup the needed resources.
if !dns {
fmt.Println("WARNING: DNS pods are not up and running, launcher requires correct DNS setup in the Kubernetes cluster.")

This comment was marked as abuse.

This comment was marked as abuse.

Copy link
Contributor

@dlespiau dlespiau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to summarise the discussion that happened in slack:

  • Currently this will have false positives when installing on a cluster running an alternate DNS provider like coreDNS
  • We could add a "are we running on minikube" condition to restrict the check, but this can also lead to some false positives, consider:
minikube addons disable kube-dns
kubectl apply -f coredns.yaml
  • We could try to do some "pre-flight" checks on the kubernetes cluster (and clean up what we did) to check if things are working ok, in this case we are interested in DNS so we could do, something along the lines of:
kubectl run --namespace=weave --image=busybox  --command launcher-pre-flight nslookup cloud.weave.work

and check the status of the pod. Hopefully we can find a nicer way to start a pod and get the exit status of the init process.

@@ -121,6 +129,27 @@ func DeleteResource(c Client, resourceType, namespace, resourceName string) erro
return err
}

// DeploymentAvailability gets the current deployment status and returs true if all the replicas are up and running.

This comment was marked as abuse.

@lilic
Copy link
Contributor Author

lilic commented Apr 9, 2018

Closing in favor of #164

@lilic lilic closed this Apr 9, 2018
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

Successfully merging this pull request may close these issues.

Weave agents failing to connect for minikube started Kubernetes RBAC cluster
3 participants