The instance hostname didn't match the RFC 952 and 1123's definition
Bug #1495388 reported by
Alex Xu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Alex Xu | ||
Kilo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The instance hostname is convert from instance's name. There is method used to do that https:/
But looks like this method didn't match all the cases described in the RFC
For example, if the host name just one character, like 'A', this method return 'A‘ also, this isn't allowed by RFC.
And the hostname was updated at wrong place: https:/
It just update the instance db entry again after instance entry creation. We can populate the hostname before instance creation, then we can save one db operation.
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
status: | Incomplete → Confirmed |
assignee: | nobody → Eli Qiao (taget-9) |
tags: | added: api liberty-rc-potential |
Changed in nova: | |
assignee: | Eli Qiao (taget-9) → Alex Xu (xuhj) |
tags: | removed: liberty-rc-potential |
Changed in nova: | |
milestone: | none → liberty-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | liberty-rc1 → 12.0.0 |
To post a comment you must log in.
Is this causing any specific issues?
There is a fairly lengthy discussion about single character hostnames here http:// serverfault. com/questions/ 162038/ are-one- letter- host-names- valid
The general impression I get is that its supported in DNS domain names and probably elsewhere as there is some ambiguity between RFC952 and RFC1123.
If this isn't causing you any specific issues I'd think that its best to leave it alone rather than adding restrictions to the api that currently don't exist and could break things.
As for the hostname being updated in the wrong place this is actually fairly well explained in the codebase. https:/ /github. com/openstack/ nova/blob/ master/ nova/compute/ api.py# L1377
The instance needs to be created first to obtain a uuid that is used in the hostname for multi instance api calls.