Booting instance with flavor too small returns NoValidHost to client when error should be e.g. InstanceTypeDiskTooSmall

Bug #1245276 reported by Kevin Jackson
This bug report is a duplicate of:  Bug #1161661: Rescheduling loses reasons. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

Ubuntu 12.04 with Havana (precise-updates and precise-proposed)

ii nova-ajax-console-proxy 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - AJAX console proxy - transitional package
ii nova-api 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - API frontend
ii nova-cert 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - certificate management
ii nova-common 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - common files
ii nova-conductor 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - conductor service
ii nova-consoleauth 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - Console Authenticator
ii nova-doc 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - documentation
ii nova-novncproxy 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - NoVNC proxy
ii nova-objectstore 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - object store
ii nova-scheduler 1:2013.2-0ubuntu1~cloud0 OpenStack Compute - virtual machine scheduler
ii python-nova 1:2013.2-0ubuntu1~cloud0 OpenStack Compute Python libraries
ii python-novaclient 1:2.15.0-0ubuntu1~cloud0 client library for OpenStack Compute API

When launching an instance of a type that is too small, the error returned to the client is NoValidHost when the real error message is (in this case) "InstanceTypeDiskTooSmall: Instance type's disk is too small for requested image" - this is confusing to the user and sends you on a different route of troubleshooting.

# nova show test1

fault | {u'message': u'No valid host was found. Exceeded max scheduling attempts 3 for instance 75ed5622-dece-4c5a-9897-daa4fda1d829', u'code': 500, u'details': u' File "/usr/lib/python2.7/dist-packages/nova/scheduler/manager.py", line 147, in run_instance |
| | legacy_bdm_in_spec) |
| | File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 85, in schedule_run_instance |
| | filter_properties, instance_uuids) |
| | File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 306, in _schedule |
| | self._populate_retry(filter_properties, properties) |
| | File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 275, in _populate_retry |
| | raise exception.NoValidHost(reason=msg) |
| | ', u'created': u'2013-10-27T20:16:07Z'}

Log entry in /var/log/nova/nova-scheduler.log

2013-10-27 20:16:03.731 11409 ERROR nova.scheduler.filter_scheduler [req-cabdc8cd-2a7e-439f-a112-3f91a890f530 108bf3466c8a4388974ecd1ce6fb005b 120926d0d0324d21a535ad870f6eb662] [instance: 75ed5622-dece-4c5a-9897-daa4fda1d829] Error from last host: compute (node compute.book): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1037, in _build_instance\n set_access_ip=set_access_ip)\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1410, in _spawn\n LOG.exception(_(\'Instance failed to spawn\'), instance=instance)\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1407, in _spawn\n block_device_info)\n', u' File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2063, in spawn\n admin_pass=admin_password)\n', u' File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2353, in _create_image\n project_id=instance[\'project_id\'])\n', u' File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 174, in cache\n *args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 312, in create_image\n raise exception.InstanceTypeDiskTooSmall()\n', u"InstanceTypeDiskTooSmall: Instance type's disk is too small for requested image.\n"]

summary: - Booting instance with flavor too small returns noValidHost to client
+ Booting instance with flavor too small returns NoValidHost to client
when error should be e.g. InstanceTypeDiskTooSmall
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Guessing, this other bug https://bugs.launchpad.net/nova/+bug/1244316 is because of this same problem.

Revision history for this message
Kevin Jackson (kevin-linuxservices) wrote :

Marked as dupe.

Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

This is also a duplicate bug with 1161661.

The root cause is retryFilter was enabled by default and default value of max_attempts is 3, so after nova compute try 3 times, nova scheduler will report "no valid host" and this will be stored to table of instance_fault for the VM.

So when you run "nova show", it will show scheduler error "no valid host" but not nova compute error.

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.