kubectl exec fail with 500 (dial tcp: lookup no such host)

Bug #1511679 reported by Egor Guz
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Magnum
New
Undecided
Ton Ngo

Bug Description

we register hosts with nova name and this name doesn't register in dns

kubectl get nodes
NAME LABELS STATUS
k8-pdbzkoijyr-0-ppo4rdunfyhl-kube-minion-agodggladxws kubernetes.io/hostname=k8-pdbzkoijyr-0-ppo4rdunfyhl-kube-minion-agodggladxws Ready

kubectl create -f /etc/kubernetes/examples/pod-nginx-with-label.yaml
kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 1/1 Running 0 5m

kubectl exec -ti nginx -- bash
error: Unable to upgrade connection: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "dial tcp: lookup k8-pdbzkoijyr-0-ppo4rdunfyhl-kube-minion-agodggladxws: no such host",
  "code": 500
}

Revision history for this message
Ton Ngo (ton-i) wrote :

The script adjusts the host name to match the nova instance name. One solution would be to adjust the DNS entry accordingly.

Changed in magnum:
assignee: nobody → Ton Ngo (ton-i)
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
Revision history for this message
Ton Ngo (ton-i) wrote :

Remember to update the Troubleshooting guide to use "kubectl exec" instead of "docker exec" so that users don't need to log into the node.

Revision history for this message
Mark Goddard (mgoddard) wrote :

Running into this myself. It's possible to get nova to register instance hostnames with neutron's internal dns: https://docs.openstack.org/mitaka/networking-guide/config-dns-int.html.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.