Full FQDN should be set if passed in nova boot call

Bug #885374 reported by Glen Campbell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Brian Lamar

Bug Description

If I create a new host with a fully-qualified domain name, the hostname is set to the FQDN with the periods removed.

Example:
    nova boot nova1.broadpool.net --flavor 3 --image 2

results in the hostname of the server being set to "nova1broadpoolnet," which is NOT what was intended.

Revision history for this message
Thierry Carrez (ttx) wrote :

The current code only sets a hostname (not a domain name), and reuses the name provided in the nova boot call as a hint, stripping all characters that are not acceptable for a hostname (including the period). I am not really sure that should be changed... Are you asking that we also set the domain name on the VMs we create ?

Changed in nova:
status: New → Incomplete
Revision history for this message
Glen Campbell (glen-campbell) wrote :

Yes, since that's what the person intended. Otherwise, you're merely creating extra work for people that's in no way required. In the case of Rackspace, it breaks backwards compatibility with our legacy cloud servers, which properly sets the FQDN if that's what the server name is.

If I set the server name to "nova1.broadpool.net," then setting the server's hostname internally to "nova1broadpoolnet" does not make sense to me. That just means that I now have to manually go into each and every server and change the name to what was intended.

Thierry Carrez (ttx)
summary: - Periods are removed from host name
+ Full FQDN should be set if passed in nova boot call
Changed in nova:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Brian Waldon (bcwaldon)
Changed in nova:
assignee: nobody → Brian Lamar (blamar)
Revision history for this message
Brian Lamar (blamar) wrote :

We should at the very least be following RFCs 952 and 1123 which allow for periods in hostnames. After that it's up to the agent to correctly set the hostname on the instance. I have a patch that I'll be submitting which addresses this.

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/1484
Committed: http://github.com/openstack/nova/commit/bcfff3dd530994d3ae22f945f429df3afc954cb0
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit bcfff3dd530994d3ae22f945f429df3afc954cb0
Author: Brian Lamar <email address hidden>
Date: Wed Nov 9 18:16:24 2011 -0500

    Follow hostname RFCs

    Updated hostname sanitization method to more closely follow RFC-952
    and RFC-1123. Also moved it to nova.utils, where it seems to fit
    better.

    Fixes bug 885374

    (Patch Set 1) Updated hostname sanitization with more efficient and
                  [opinion] more readable implementation.

    Change-Id: I60d7ee89867c05950bec1fd53b072a1c6247ebea

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-2 → 2012.1
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.