Use correct hostname to get instances.
Use correct hostname to get instances.

socket.getfqdn() would return a fully qualified domain name
which maybe invalid for nova to get instances by hostname.
If the host that runs devstack is virtual(like running
devstack on AWS), socket.getfqdn() may return a domain name
which is not the host name and nova cannot use that to get
instances running on current host.

Fix bug: #1166717

Change-Id: Ic6cc8607bcdeee720c5d46d44fbaa589b4fb950e

fabian4/ceilometer,fabian4/ceilometer,maestro-hybrid-cloud/ceilometer,NeCTAR-RC/ceilometer,cernops/ceilometer,ityaptin/ceilometer,isyippee/ceilometer,pkilambi/ceilometer,redhat-openstack/ceilometer,rickerc/ceilometer_audit,MisterPup/Ceilometer-Juno-Extension,eayunstack/ceilometer,MisterPup/Ceilometer-Juno-Extension,froyobin/ceilometer,rickerc/ceilometer_audit,rackerlabs/instrumented-ceilometer,openstack/aodh,JioCloud/ceilometer,isyippee/ceilometer,tanglei528/ceilometer,m1093782566/openstack_org_ceilometer,citrix-openstack-build/ceilometer,tanglei528/ceilometer,eayunstack/ceilometer,pczerkas/aodh,ityaptin/ceilometer,Juniper/ceilometer,m1093782566/openstack_org_ceilometer,pczerkas/aodh,pkilambi/ceilometer,mathslinux/ceilometer,idegtiarov/ceilometer,luogangyi/Ceilometer-oVirt,sileht/aodh,cernops/ceilometer,openstack/aodh,sileht/aodh,rickerc/ceilometer_audit,chungg/aodh,NeCTAR-RC/ceilometer,openstack/ceilometer,JioCloud/ceilometer,openstack/ceilometer,mathslinux/ceilometer,froyobin/ceilometer,redhat-openstack/ceilometer,chungg/aodh,idegtiarov/ceilometer,JioCloud/ceilometer,r-mibu/ceilometer,citrix-openstack-build/ceilometer,r-mibu/ceilometer,luogangyi/Ceilometer-oVirt,maestro-hybrid-cloud/ceilometer,NeCTAR-RC/ceilometer,citrix-openstack-build/ceilometer,Juniper/ceilometer,rackerlabs/instrumented-ceilometer,tanglei528/ceilometer,rackerlabs/instrumented-ceilometer