launch a instance which name include spot failed

Bug #1655563 reported by yan tan
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
Low
Unassigned

Bug Description

can not launch a instance which name include spot and number like 14.4.

nova-conductor.log find this error.

2017-01-11 16:27:46.928 23 ERROR nova.scheduler.utils [req-ed6f17d5-ef49-412e-8e7e-703b7ed5738b eef7aab2a2bf4067a4baf27cdbe62cc6 90e82be1b4a34c62a27d4fde986e00c2 - - -] [instance: 46fe3b71-0c90-458c-8be6-cd9dcd8733a3] Error from last host: compute1 (node compute1): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1926, in _do_build_and_run_instance\n filter_properties)\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2116, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n', u"RescheduledException: Build of instance 46fe3b71-0c90-458c-8be6-cd9dcd8733a3 was re-scheduled: Invalid input for dns_name. Reason: '14.4' not a valid PQDN or FQDN. Reason: TLD '4' must not be all numeric.\nNeutron server returns request_ids: ['req-9a2fa7cb-35cd-462f-973d-5c618b72b18d']\n"]
2017-01-11 16:27:47.113 23 WARNING nova.scheduler.utils [req-ed6f17d5-ef49-412e-8e7e-703b7ed5738b eef7aab2a2bf4067a4baf27cdbe62cc6 90e82be1b4a34c62a27d4fde986e00c2 - - -] Failed to compute_task_build_instances: No valid host was found. There are not enough hosts available.

Tags: api
yan tan (yetbing)
information type: Private Security → Public
description: updated
yan tan (yetbing)
Changed in horizon:
assignee: nobody → yan tan (yetbing)
Changed in horizon:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → next
Revision history for this message
Akihiro Motoki (amotoki) wrote :

It happens even with CLI. http://paste.openstack.org/show/628012/
Looks line a nova bug.

Changed in horizon:
milestone: next → none
assignee: yan tan (yetbing) → nobody
affects: horizon → nova
Changed in nova:
status: Triaged → New
importance: Wishlist → Undecided
Revision history for this message
melanie witt (melwitt) wrote :

It looks like this is because the instance 'name' is used as the instance hostname, which is then passed to update the neutron port's dns_name and then that call fails because it is not a valid FQDN. The top-level domain name cannot be all numeric.

When we set instance.hostname, we run it through utils.sanitize_hostname() first to ensure the resulting hostname conforms to the RFC-952 and RFC-1123 specs. So it looks like utils.sanitize_hostname() needs to be enhanced to handle this *or* we need to check the resulting hostname for RFC conformance and fail earlier, before the RPC cast to conductor. That way the user will receive a 400 from the API instead of getting an instance in ERROR state.

tags: added: api
Changed in nova:
importance: Undecided → Low
status: New → Triaged
Choi-Sung-Hoon (knu-cse)
Changed in nova:
assignee: nobody → Choi-Sung-Hoon (knu-cse)
Revision history for this message
Choi-Sung-Hoon (knu-cse) wrote :

Hi, i assigned this bug to me to contribute for the first time.

I just installed devstack and tried the CLI command in the http://paste.openstack.org/show/628012/ and it works fine.

Am i doing something wrong?

here's the output.

Choi-Sung-Hoon (knu-cse)
Changed in nova:
assignee: Choi-Sung-Hoon (knu-cse) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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