QEMU hypervisor type returned when libvirt_type = kvm

Bug #1195361 reported by Richard Theis on 2013-06-27
This bug affects 7 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Tetsuro Nakamura
Robb Romans

Bug Description

As the following output indicates, the QEMU hypervisor type is used even when libvirt_type = kvm in nova.conf.

# grep libvirt_type /etc/nova/nova.conf
libvirt_type = kvm
# nova hypervisor-show 1 | grep hypervisor_type
| hypervisor_type | QEMU

It appears that the OpenStack libvirt driver uses the libvirt connection type to determine the hypervisor type instead of the libvirt_type configuration option. Should libvirt_type be used to determine KVM vs QEMU hypervisor type or is there another configuration for this? From a user perspective, getting the QEMU versus KVM hypervisor type correct is important when setting the hypervisor_type property on an image.

tags: added: libvirt
Michael Still (mikal) on 2013-07-05
Changed in nova:
status: New → Triaged
importance: Undecided → Low
Rongze Zhu (zrzhit) on 2013-07-05
Changed in nova:
assignee: nobody → Rongze Zhu (zrzhit)
David Peraza (dperaza) wrote :

libvirt does not differentiate between qemu and kvm when calling connection.getType(), which is the value returned in hypervisor-show, I think it is just parsing qemu out of the connection string libvirt.open("qemu:///system")

Would it be simpler to just return libvirt_type as the hypervisor_type in hypervisor-show? I wonder if this has repercussions for images out there using qemu to mean kvm in hypervisor_type filter.

Lawrance (jing) on 2013-07-20
Changed in nova:
assignee: Rongze Zhu (zrzhit) → Lawrance (jing)
assignee: Lawrance (jing) → nobody
assignee: nobody → Lawrance (jing)
assignee: Lawrance (jing) → nobody
Lawrance (jing) wrote :

sorry for the mistake of assignee:)

Lawrance (jing) on 2013-08-08
Changed in nova:
assignee: nobody → Lawrance (jing)
status: Triaged → In Progress
Lawrance (jing) on 2013-08-20
Changed in nova:
assignee: Lawrance (jing) → nobody
Richard Theis (rtheis) wrote :

If no code change will be made for this issue then the OpenStack Compute Administrator Manual should be updated to remove 'kvm' as a valid value for the image hypervisor_type property. And maybe document that 'qemu' is used for both QEMU and KVM hypervisor setups.

Lawrance (jing) on 2013-08-25
Changed in nova:
status: In Progress → Confirmed
Lawrance (jing) wrote :

agree with Richard.

Łukasz Jernaś (deejay1) wrote :

Shouldn't this bug be reassigned to openstack-manuals then?

Richard Theis (rtheis) on 2013-10-17
affects: nova → openstack-manuals
Robert Collins (lifeless) wrote :

This seems very much like a bug, as though qemu and kvm share a common interface, their capabilities are very very different.

Stephen Gordon (sgordon) wrote :

Moving back to nova for reassessment based on Robert's comment.

affects: openstack-manuals → nova
Changed in nova:
status: Confirmed → Incomplete
Sean Dague (sdague) wrote :

Honestly, it's really a docs bug.

Changed in nova:
status: Incomplete → Won't Fix
Andreas Jaeger (jaegerandi) wrote :

Has any of you have references to pages that list this wrongly?

Andreas Jaeger (jaegerandi) wrote :
Changed in openstack-manuals:
status: New → Confirmed
importance: Undecided → High
Robb Romans (rromans) on 2014-09-17
Changed in openstack-manuals:
assignee: nobody → Robb Romans (rromans)

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

Changed in openstack-manuals:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/122218
Committed: https://git.openstack.org/cgit/openstack/openstack-manuals/commit/?id=59a201bdf276d751f41066373db125bd46f3c400
Submitter: Jenkins
Branch: master

commit 59a201bdf276d751f41066373db125bd46f3c400
Author: Robb Romans <email address hidden>
Date: Wed Sep 17 13:31:07 2014 -0500

    Remove kvm as a hypervisor_type argument

    QEMU is used whether specifying either qemu or kvm as an argument to
    hypervisor_type. Therefore, remove kvm as a supported argument.

    Change-Id: I89f2b907fa868e50c2b65c2bf4a8e414242dd9fc
    Closes-bug: #1195361

Changed in openstack-manuals:
status: In Progress → Fix Released
Chris Friesen (cbf123) wrote :

Given the thread on the operators list, it seems like this may still be an issue. Perhaps it would make sense to export the libvirt_type rather than the hypervisor driver when running hypervisor-show? It'd have to be done via a microversion, of course.

This issue was fixed in the openstack/openstack-manuals 15.0.0 release.

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

Changed in nova:
assignee: nobody → Tetsuro Nakamura (tetsuro0907)
status: Won't Fix → In Progress

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

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

Change abandoned by Tetsuro Nakamura (<email address hidden>) on branch: master
Review: https://review.openstack.org/531327
Reason: changed my mind to use ComputeNode.supported_hv_specs object.

Reviewed: https://review.openstack.org/531347
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=eaa766ee2093c24fd61c61e52f46bdd9ff9e93d2
Submitter: Zuul
Branch: master

commit eaa766ee2093c24fd61c61e52f46bdd9ff9e93d2
Author: Tetsuro Nakamura <email address hidden>
Date: Fri Jan 5 16:59:29 2018 +0900

    [libvirt] Filter hypervisor_type by virt_type

    ComputeNode.supported_hv_specs field has hypervisor_type
    infomation about which type (e.g. KVM or both KVM and QEMU) of guests
    are supported by the hypervisor, but it doesn't supply information
    about which virt_type is set to that compute node.

    This means that we have no way to know which type of guests are going
    to be built in that compute node from the ComputeNode object. This can
    cause wrong behavior in scheduler filters using the supported_hv_specs
    object, such as ImagePropertiesFilter.

    In libvirt driver, this patch adds a filter to exclude supported
    hypervisor_types other than the virt_type which has been set by
    operator via nova.conf.

    Partial-Bug: #1195361
    Change-Id: I986fe09f97e4d5cad940bea85a87c58606314dba

Change abandoned by Tetsuro Nakamura (<email address hidden>) on branch: master
Review: https://review.openstack.org/531328

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers