From: Bob Kukura Date: Fri, 13 Sep 2013 20:12:30 +0000 (-0400) Subject: Use same hostname function as nova X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=140029ebd006c116ee684890dd70e13b7fc478ec;p=openstack-build%2Fneutron-build.git Use same hostname function as nova Certain plugin implementations of port binding depend on the port's binding:host_id set by nova matching the compute node's hostname reported by neutron agents in agents_db. Nova uses socket.gethostname() to obtain the hostname, so this changes neutron to also use socket.gethostname(), instead of socket.getfqdn() to obtain the default hostname. If deployments require a specific hostname format or value, the hostname can be specified in nova and neutron configuration files. Closes-Bug: 1223000 Change-Id: I5de9c6b0df16eca482037a5bdc3a77dc52f4adba --- diff --git a/neutron/common/utils.py b/neutron/common/utils.py index 62a416d81..e72fcee14 100644 --- a/neutron/common/utils.py +++ b/neutron/common/utils.py @@ -158,7 +158,7 @@ def parse_mappings(mapping_list, unique_values=True): def get_hostname(): - return socket.getfqdn() + return socket.gethostname() def compare_elements(a, b):