Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

instance hostname not getting resolved locally ?

I am using liberty with neutron running on controller nodes in HA. Instance is properly getting private ip address and I am able to resolve google.com from instance but when I try to resolve instance's hostname, I am getting below error.

Instance details

host-10-10-0-101:~ # nslookup host-10-10-0-101
Server:         172.16.8.2
Address:        172.16.8.2#53

** server can't find host-10-10-0-101: NXDOMAIN

host-10-10-0-101:~ # ping host-10-10-0-101
ping: unknown host host-10-10-0-101

host-10-10-0-101:~ # cat /etc/hosts
127.0.0.1  localhost.rmnus.sen.symantec.com localhost localhost
::1     localhost.rmnus.sen.symantec.com localhost localhost ip6-localhost ip6-loopback

host-10-10-0-101:~ # cat /etc/resolv.conf

search openstacklocal
nameserver 172.16.8.2
nameserver 172.16.8.3

DNSMASQ running on controller node

nobody    37679      1  0 04:33 ?        00:00:00 dnsmasq --no-hosts --no-resolv --strict-order --except-interface=lo --pid-file=/var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/host --addn-hosts=/var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/opts --dhcp-leasefile=/var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/leases --dhcp-match=set:ipxe,175 --bind-interfaces --interface=tap60be5562-46 --dhcp-range=set:tag0,10.10.0.0,static,600s --dhcp-option-force=option:mtu,1416 --dhcp-lease-max=65536 --conf-file= --server=172.16.8.2 --server=172.16.8.3 --domain=openstacklocal

root@controller-01:~# cat /var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/host
fa:16:3e:1e:8a:4a,host-10-10-0-10.openstacklocal.,10.10.0.10
fa:16:3e:00:82:73,host-10-10-0-21.openstacklocal.,10.10.0.21
fa:16:3e:0d:21:97,host-10-10-0-101.openstacklocal,10.10.0.101

This instance doesn't have cloud-init thats why it gets hostname from dnsmasq generated by neutron. Instance should be able to resolve itself and ping itself using it's own hostname. This was working fine on nova-network. How does neutron handle DNS resolution of instance hostname specifically in this case instance has got the hostname generated by neutron?