Heat/Using-the-metadata-server
First edit /etc/heat/heat-metadata.conf
Set bind_host = <ip of openstack network interface> basically:
ifconfig | grep -A 1 demonet demonetbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
So for me it is 10.0.0.1
Then start the server:
heat-metadata &
Note: If you start the server at about the same time as the engine, the metadata server may not register properly. The metadata server registration code needs improvement.
Note: if you find that metadata is not being received by the server from the instance, check that you have connectivity to tcp:8002 by using nmap on the instance, it may be necessary to add an iptables rule which allows the instance access to the service on the host:
iptables -I INPUT -p tcp --dport 8002 -j ACCEPT -i demonetbr0
If this solves your problem and allows connectivity to the metadata server from the instance, you will need to add the rule to the /etc/sysconfig/iptables file, restart iptables, and restart openstack, if you fail to do this, the manually added rule will be overwritten by openstack every time a new instance is launched.
vim /etc/sysconfig/iptables service iptables restart tools/openstack restart