From 16f8e14b24006b23e1965329fa27ab7fcab3e6de Mon Sep 17 00:00:00 2001 From: Brooklyn Chen Date: Thu, 11 Jul 2013 19:11:11 +0800 Subject: [PATCH] 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 --- ceilometer/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceilometer/service.py b/ceilometer/service.py index 5f4041a38..7949558ff 100644 --- a/ceilometer/service.py +++ b/ceilometer/service.py @@ -31,7 +31,7 @@ from ceilometer.openstack.common import rpc cfg.CONF.register_opts([ cfg.StrOpt('host', - default=socket.getfqdn(), + default=socket.gethostname(), help='Name of this node. This can be an opaque identifier. ' 'It is not necessarily a hostname, FQDN, or IP address. ' 'However, the node name must be valid within '