← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1518230] [NEW] AggregateInstanceExtraSpecsFilter and ComputeCapabilitiesFilter check flavor extra_specs which causes a conflict

 

Public bug reported:

In nova.conf,when scheduler_default_filters include ComputeCapabilitiesFilter and AggregateInstanceExtraSpecsFilter, I set flavor extra_specs and aggregate1 to node_type=kvm,then I boot an instance with this flavor,except the instance is assigned to hosts of aggregate1(az1) ,but the vm state is error,in scheduler log:
2015-11-20 09:55:53.577 12227 INFO nova.filters [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] Filter ComputeCapabilitiesFilter returned 0 hosts
 I think this is unreasonable,AggregateInstanceExtraSpecsFilter and ComputeCapabilitiesFilter are all check flavor extra_specs,This causes a conflict.I expect can choose the matching host according to flavor extra_specs and aggregate metadata.
The ComputeCapabilitiesFilter always return 0 hosts when the flavor extra_specs add new properties.

test steps:
1、 nova aggregate-list 
+----+------------+-------------------+
| Id | Name       | Availability Zone |
+----+------------+-------------------+
| 1  | aggregate1 | az1               |
| 2  | aggregate2 | az2               |
+----+------------+-------------------+
2、 nova aggregate-set-metadata aggregate1 node_type=kvm
Metadata has been successfully updated for aggregate 1.
+----+------------+-------------------+---------------------------------------+------------------------------------------+
| Id | Name       | Availability Zone | Hosts                                 | Metadata                                 |
+----+------------+-------------------+---------------------------------------+------------------------------------------+
| 1  | aggregate1 | az1               | '98f537e1af0d', 'SBCR-chenling-slot4' | 'availability_zone=az1', 'node_type=kvm' |
+----+------------+-------------------+---------------------------------------+------------------------------------------+
3、nova flavor-key 2 set node_type=kvm

4、add AggregateInstanceExtraSpecsFilter to scheduler_default_filters in nova.conf
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter,PciPassthroughFilter,AggregateInstanceExtraSpecsFilter
5.、systemctl restart openstack-nova-scheduler.service
6、boot an instance,but ComputeCapabilitiesFilter return 0 hosts
nova boot --flavor 2 --boot-volume 8a2ba353-75a6-4eea-bf3c-35f8f42b94a2 --nic net-id=ab66d9e3-c6ee-49ec-b192-fdee4d41c088  test_vm1
scheduler log:
2015-11-20 09:55:53.559 12227 INFO nova.scheduler.filter_scheduler [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] Attempting to build 1 instance(s) uuids: [u'70eb860d-e0ce-4202-a250-6f15ccf2021a']
2015-11-20 09:55:53.577 12227 INFO nova.filters [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] Filter ComputeCapabilitiesFilter returned 0 hosts
2015-11-20 09:55:53.578 12227 WARNING nova.scheduler.driver [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] [instance: 70eb860d-e0ce-4202-a250-6f15ccf2021a] Setting instance to ERROR state.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1518230

Title:
  AggregateInstanceExtraSpecsFilter and ComputeCapabilitiesFilter check
  flavor extra_specs which causes a conflict

Status in OpenStack Compute (nova):
  New

Bug description:
  In nova.conf,when scheduler_default_filters include ComputeCapabilitiesFilter and AggregateInstanceExtraSpecsFilter, I set flavor extra_specs and aggregate1 to node_type=kvm,then I boot an instance with this flavor,except the instance is assigned to hosts of aggregate1(az1) ,but the vm state is error,in scheduler log:
  2015-11-20 09:55:53.577 12227 INFO nova.filters [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] Filter ComputeCapabilitiesFilter returned 0 hosts
   I think this is unreasonable,AggregateInstanceExtraSpecsFilter and ComputeCapabilitiesFilter are all check flavor extra_specs,This causes a conflict.I expect can choose the matching host according to flavor extra_specs and aggregate metadata.
  The ComputeCapabilitiesFilter always return 0 hosts when the flavor extra_specs add new properties.

  test steps:
  1、 nova aggregate-list 
  +----+------------+-------------------+
  | Id | Name       | Availability Zone |
  +----+------------+-------------------+
  | 1  | aggregate1 | az1               |
  | 2  | aggregate2 | az2               |
  +----+------------+-------------------+
  2、 nova aggregate-set-metadata aggregate1 node_type=kvm
  Metadata has been successfully updated for aggregate 1.
  +----+------------+-------------------+---------------------------------------+------------------------------------------+
  | Id | Name       | Availability Zone | Hosts                                 | Metadata                                 |
  +----+------------+-------------------+---------------------------------------+------------------------------------------+
  | 1  | aggregate1 | az1               | '98f537e1af0d', 'SBCR-chenling-slot4' | 'availability_zone=az1', 'node_type=kvm' |
  +----+------------+-------------------+---------------------------------------+------------------------------------------+
  3、nova flavor-key 2 set node_type=kvm

  4、add AggregateInstanceExtraSpecsFilter to scheduler_default_filters in nova.conf
  scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter,PciPassthroughFilter,AggregateInstanceExtraSpecsFilter
  5.、systemctl restart openstack-nova-scheduler.service
  6、boot an instance,but ComputeCapabilitiesFilter return 0 hosts
  nova boot --flavor 2 --boot-volume 8a2ba353-75a6-4eea-bf3c-35f8f42b94a2 --nic net-id=ab66d9e3-c6ee-49ec-b192-fdee4d41c088  test_vm1
  scheduler log:
  2015-11-20 09:55:53.559 12227 INFO nova.scheduler.filter_scheduler [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] Attempting to build 1 instance(s) uuids: [u'70eb860d-e0ce-4202-a250-6f15ccf2021a']
  2015-11-20 09:55:53.577 12227 INFO nova.filters [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] Filter ComputeCapabilitiesFilter returned 0 hosts
  2015-11-20 09:55:53.578 12227 WARNING nova.scheduler.driver [req-b48f1a33-fc4d-4ea2-82a4-9a827e6a7a61 bf2c688edb5d41b0ba66e1a4fe510985 db57c7f7bc7f420fb4f0c1663da05a42] [instance: 70eb860d-e0ce-4202-a250-6f15ccf2021a] Setting instance to ERROR state.

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


Follow ups