← Back to team overview

openstack team mailing list archive

Re: [RFC] Add more host checks to the compute filter

 

On Tue, Jul 03, 2012 at 04:07:36PM -0600, Jim Fehlig wrote:
> Hi Daniel,
> 
> Attached is a patch that implements filtering on (architecture,
> hypervisor_type, vm_mode) tuple as was discussed in this previous patch
> 
> https://review.openstack.org/#/c/9110/
> 
> CC'ing Chuck since he is the author of the ArchFilter patch.
> 
> Feedback appreciated before sending this off to gerrit.

AFAICT, this only allows you to tag each node with a single triplet
(arch, hv_type, vm_mode). We in fact need to expose a list of triplets.
Basically if you look at the libvirt capabilities XML "virsh capabilities"
you'll see a list of <guest> elements in there. Each one of those guest
definitions corresponds to a triplet, so we need to expose all of them.

For example a KVM x86-64 node can provide

  (x86_64, kvm, hvm)
  (i686, kvm, hvm)

A XenAPI x86-64 node can provide

  (x86_64, xen, hvm)
  (i686, xen, hvm)
  (x86_64, xen, xen)
  (i686, xen, xen)

A QEMU node can provide

  (x86_64, qemu, hvm)
  (i686, qemu, hvm)
  (ppc, qemu, hvm)
  (ppc64, kvm, hvm)
  (sparc64, kvm, hvm)
  (arm7, kvm, hvm)

And many more arbitrary combinations....

Meanwhile, bearing in mind the availability of paravirt_ops in all
modern Linux hosts, a VM image can be capable of being run on multiple
different triplets.

Rather than tagging VM images with multiple triplets though, we probably
want to record a single (arch, hv_type, vm_mode) triplet against instance
types. If the user wants to use the same image with multiple different
triplets, then they can just choose a different instance type.

I'd say it is worth mocking up the changes to the libvirt driver.py
so as to validate the design of the schedular filters. When the arch
filter was added the list of guest arches was added in the get_cpu_info()
method of the libvirt driver.py. I tend to thing that this was the wrong
place to add it, since get_cpu_info() is refering to the host CPU,
where as these triplets are related to guests CPUs, which are not
actually required to match host CPUs.  So I'd probably remove the
"permitted_instance_types" data from libvirt's get_cpu_info() method
and enhance the libvirt.driver.HostState class' update_status()
method to return the list of (arch, hv_type, vm_mode) triplets.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


References