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 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 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 localhost localhost
::1 localhost localhost ip6-localhost ip6-loopback

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

search openstacklocal

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,,static,600s --dhcp-option-force=option:mtu,1416 --dhcp-lease-max=65536 --conf-file= --server= --server= --domain=openstacklocal

root@controller-01:~# cat /var/lib/neutron/dhcp/8822445d-2185-4b7b-97bc-ee26318c71fa/host

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?