Skip to content

Commit

Permalink
Use same hostname function as nova
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Bob Kukura committed Sep 13, 2013
1 parent 932e5b5 commit 140029e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neutron/common/utils.py
Expand Up @@ -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):
Expand Down

0 comments on commit 140029e

Please sign in to comment.