sanitize_hostname() fails to account for domain part
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Expired
|
Undecided
|
Unassigned |
Bug Description
The function nova.utils.
make them suitable for use as host names. Among other things it contains
the function truncate_hostname() that truncates host names to a maximum
length of 63 characters. Unfortunately this truncation does not take
into account the host names' domain part (DEFAULT/
nova.conf).
Consequently, a 63 character host name plus a domain part (e.g.
`.novalocal`) will yield a 73 character net host name passed to
cloud-init inside the instance, which can cause problems with host name
setting code (this can prevent instances from deploying properly, see
https:/
The Heat project has code to handle this kind of problem, but it's more
of a stopgap measure:
https:/
I think the better place to fix this is Nova. Unlike Heat, Nova knows
the domain name it uses and can truncate host names enough to leave room
for the domain name.
Changed in nova: | |
status: | New → Confirmed |
status: | Confirmed → New |
Changed in nova: | |
status: | New → In Progress |
I submitted a fix already (CI didn't post the link for some reason): https:/ /review. openstack. org/#/c/ 356561/