use FQDN for hostnames of services

Bug #981294 reported by Christian Berendt
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Christian Berendt

Bug Description

at the moment a running service registers in the database using it's short hostname. i would prefer it to see the FQDN in the database to have an unique identifier for a host. the shortname of two hosts could be the same in a bigger enviroment working with several availability zones.

shortname could be used if the fqdn is not available on a system.

mysql> select host from services;
+--------+
| host |
+--------+
| os0007 |
| plum |
| plum |
| fig |
| fig |
+--------+
5 rows in set (0.01 sec)

Revision history for this message
Christian Berendt (berendt) wrote :

The parameter "host" in /etc/nova/nova.conf can be used to manually set the identifier of a host where a service is running on.

But I still would prefer to set the value to the FQDN and not to the shortname of a system by default. I don't want to add the parameter "host" to every /etc/nova/nova.conf.

Revision history for this message
Christian Berendt (berendt) wrote :

Using socket.getfqdn() looks good to me (http://docs.python.org/library/socket.html)

If socket.getfqdn() doesn't return the FQDN it fails back to socket.gethostname() (that's the state of the art in flags.py).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6556

Changed in nova:
assignee: nobody → Christian Berendt (berendt)
status: New → In Progress
Revision history for this message
Thierry Carrez (ttx) wrote :

Review was abandoned, would you consider reviving it ?

Revision history for this message
Joe Gordon (jogo) wrote :

This approach was attempted but caused some issues: please see https://review.openstack.org/#/c/24080/

Changed in nova:
status: In Progress → Incomplete
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.