architecture filtering should be done in its own filter

Bug #1037339 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Jim Fehlig

Bug Description

Commit d39137fa27cb175ba22f3af4ef06a93684b9d86b added a the ability to filter on archtechture but added it to the compute filter. The compute filter should just be filtering on is up / enabled, and the architecture filtering should be done in its own filter.

Changed in nova:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Jim Fehlig (jfehlig)
milestone: none → folsom-rc1
Revision history for this message
Chuck Short (zulcss) wrote :

I just noticed this and this is what baiscally the nova/scheduler/filters/arch_filter.py does already.

Revision history for this message
Vish Ishaya (vishvananda) wrote :

So the more complete matching should be moved to the arch_filter instead of the compute_filter.

Revision history for this message
Jim Fehlig (jfehlig) wrote :

Yep, I thought of just adding the additions to Chuck's arch filer on the drive home today. I had already planned to send a patch to remove the arch filter if/when this was accepted, and I decided it was best to just fold into the existing arch filter after reading Vish's suggestion in the review comments.

Still, much of commit 31336b35 can be removed since arch is one of the triplets in the supported_instances list.

I'll see about posting some patches later tonight or tomorrow.

Revision history for this message
Jim Fehlig (jfehlig) wrote :

Chuck,

Commit d39137fa27cb175ba22f3af4ef06a93684b9d86b exposes all the instance types a hypervisor supports in a list of triplets, with each triplet containing (architecture, hypervisor_type, vm_mode). E.g. a qemu host can support the following types of instances

[(i686, qemu, hvm), (x86_64, qemu, hvm), (arm, qemu, hvm), (microblaze, qemu, hvm), (microblazeel, qemu, hvm), (mips, qemu, hvm), (mipsel, qemu, hvm), (sparc, qemu, hvm), (ppc, qemu, hvm), (ppc64, qemu, hvm), (s390x, qemu, hvm)]

whereas a kvm host supports

[(i686, kvm, hvm), (x86_64, kvm, hvm), (i686, qemu, hvm), (x86_64, qemu, hvm)]

and a Xen host supports

[(i686, xen, xen), (x86_64, xen, xen), (i686, xen, hvm), (x86_64, xen, hvm)]

So I will move d39137fa to the arch filter and remove permitted_instance_types from the libvirt driver.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/11454

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Jim Fehlig (jfehlig) wrote :

Ok, I took a first stab at a patch

https://review.openstack.org/#/c/11454/

Testing looks good. I'm surprised the pep8 tests are passing due to excessive line lengths in doc/source/devref/filter_scheduler.rst and etc/nova/nova.conf.sample. Perhaps such files aren't covered in the tests? Not sure the best way to handle wrapping long lines in those files, so any advice is appreciated.

I'll still need to cook up a patch to remove permitted_instance_types. It is late here, so will take care of it tomorrow.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/11604

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/11604
Committed: http://github.com/openstack/nova/commit/5ea7db9b7195132df4d8efea0a8e41e4f994b23c
Submitter: Jenkins
Branch: master

commit 5ea7db9b7195132df4d8efea0a8e41e4f994b23c
Author: Jim Fehlig <email address hidden>
Date: Fri Aug 17 15:26:01 2012 -0600

    Introduce ImagePropertiesFilter scheduler filter

    Commit d39137fa added functionality to the ComputeFilter to filter on
    architecture, hypervisor_type, and vm_mode. The existing ArchFilter
    already filtered on architecture. This patch merges the ComputeFilter
    functionality introduced in d39137fa with the ArchFilter to create the
    ImagePropertiesFilter. The ImagePropertiesFilter uses image properties
    specified in the request_spec to filter hosts.

    This patch also adds the ImagePropertiesFilter to the list of default
    filters specified by the scheduler_default_filters FLAG.

    Fixes LP Bug #1037339

    DocImpact

    Change-Id: Ifa6fccf2db266b0fe3457d58fc81fdb50ffcbc0f

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc1 → 2012.2
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.