← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1186881] Re: Boot Instance Error with a Flavor which is set with os-extra_specs and has hosts meet the requirements in the cloud system

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => havana-2

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1186881

Title:
  Boot Instance Error with a  Flavor which is set  with os-extra_specs
  and has hosts meet the requirements in the cloud system

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  Repro:
         1 Create a Flavor m8, and set extra_specs :{u'disk_available': u'130', u'vcpus_used': u'<= 5'}
         2 Boot an Instance with flavor m8
    
  Expected:
         Can Boot Instance successfully when there are hosts match the the os-extra_specs requests

  Actual: 
          Boot Instance fail with the Error: message:NoValidHost Code:500 

  nova-list 
  | ID                                                               | Name        | Status       | Task State | Power State | Networks  
  | 896a28b4-a09b-40bc-a269-0ac208fea553 | hahahaha  | ERROR   | None         | NOSTATE   |                 

  nova show 
  | Property                    | Value                                                                           |
  +-----------------------------+---------------------------------------------------------------------------------+
  | status                      | ERROR   
  | fault                       | {u'message': u'NoValidHost', u'code': 500, u'created': u'2013-06-03T05:42:18Z'} |

  the type of the parameter values in the  capabilities are numbers, while the match() method in the extra_specs_ops.py  handle it as str type, and return false.
  For example the 'disk_available' value in the capabilities is 131, while in the instance_type extra_specs is '131'
  /nova/nova/scheduler/filters/compute_capabilities_filter.py
  https://github.com/openstack/nova/blob/master/nova/scheduler/filters/compute_capabilities_filter.py

  /nova/nova/scheduler/filters/extra_specs_ops.py
  https://github.com/openstack/nova/blob/master/nova/scheduler/filters/extra_specs_ops.py

  capabilities = {u'disk_available': 131, u'vcpus_used': 1,
  u'supported_instances': [[u'i686', u'qemu', u'hvm'], [u'i686', u'kvm',
  u'hvm'], [u'x86_64', u'qemu', u'hvm']], u'hypervisor_type': u'QEMU',
  u'host_ip': u'127.0.0.1', u'hypervisor_hostname': u'hfl-
  ThinkPad-T400', u'host_memory_free': 1612, u'disk_total': 143,
  u'cpu_info': {u'vendor': u'Intel', u'model': u'n270', u'arch':
  u'i686', u'features': [u'lahf_lm', u'lm', u'sse4.1', u'xtpr', u'cx16',
  u'tm2', u'est', u'vmx', u'ds_cpl', u'pbe', u'tm', u'ht', u'ss',
  u'acpi', u'ds', u'pse36'], u'topology': {u'cores': 2, u'threads': 1,
  u'sockets': 1}}, u'host_memory_total': 2902, 'timestamp':
  datetime.datetime(2013, 5, 29, 3, 5, 46, 764863),
  u'hypervisor_version': 1000000, u'disk_used': 5, u'vcpus': 2}

  instance_type = {u'disabled': False, u'root_gb': 1, u'name': u'm6',
  u'flavorid': u'44', u'deleted': 0, u'created_at':
  u'2013-05-29T03:02:22.000000', u'ephemeral_gb': 0, u'updated_at':
  None, u'memory_mb': 512, u'vcpus': 1, u'extra_specs':
  {u'disk_available': u'=131'}, u'swap': 0, u'rxtx_factor': 1.0,
  u'is_public': True, u'deleted_at': None, u'vcpu_weight': None, u'id':
  21}

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1186881/+subscriptions