Invalid input for dns_name when spawning instance with .number at the end
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Low
|
Unassigned |
Bug Description
When attempting to deploy an instance with a name which ends in dot <number> (e.g. .123, as in an all-numeric TLD) or simply a name that, after conversion to dns_name, ends as .<number>, nova conductor fails with the following error:
2016-05-15 13:15:04.824 ERROR nova.scheduler.
This throws one instance of the infamous Horizon message: Error: No valid host was found. There are not enough hosts available.
This issue was observed using stable/mitaka via DevStack (nova commit fb3f1706c68ea5b
In the above example, the instance name is "networking-ovn (Ubuntu 16.04)", which resulted in an attempted dns_name=
tags: | added: compute |
I am not sure if this is a bug, we could replace the dot(s) in the host name with a different char, for example a "_" but then the user will lose the option to define a hostname as a FQDN.
And according to the rfc952:
' A "name" (Net, Host, Gateway, or Domain name) is a text string up
to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
sign (-), and period (.). Note that periods are only allowed when
they serve to delimit components of "domain style names"'
So if the user uses a period it should know that it is allowed only to delimit a domain name and it has to be a valid one.
I am going to mark it as invalid, please let me know if you are not happy about this decision.