On 10/13/2016 2:18 PM, Matt Riedemann wrote:
On 10/13/2016 12:30 PM, Matt Riedemann wrote:
In Newton we replaced the CONF.libvirt.use_usb_tablet option with
CONF.pointer_model, both default to creating a usb tablet input device
for HVM guests in the libvirt driver.

To straddle backward compatibility with use_usb_tablet=False, we added
None and ps2mouse as options for the pointer_model config option, which
basically mean if you specify those you get whatever default input
device there is (ps2mouse for libvirt x86).

The hw_pointer_model image metadata takes precedence over the config
option in nova.

I noticed today that the hw_pointer_model ImageMeta object property is
using a field with a single enum, 'usbtablet'. So while the config
option lets you set None/ps2mouse/usbtablet, the image meta value can
only be usbtablet if it's set.

This is important because we don't have hw_pointer_model defined in the
glance libvirt image metadefs:


I'd like to add it but the only value you can have for it is 'usbtablet'
right now. Having a single enum value seems kind of weird, but maybe
that's fine. I only found 3 other image metadefs in glance that had
'None' as possible enum values.

So would we define 'ps2mouse' as a hw_pointer_model option in nova or
just add hw_pointer_model to glance and it has a single enum value for
setting it, which is usbtablet? If you don't want usbtablet then you
don't add hw_pointer_model to your image - HOWEVER - given we default
CONF.pointer_model='usbtablet' we're still going to try and set it when
creating the guest, which may or may not fail depending on your other
config for that compute host (e.g. any non-kvm/qemu virt_type will fail).

Alternatively we could change the default value of CONF.pointer_model to
be None and then it's purely an opt-in behavior, but it would be a
change in default behavior for guests on kvm/qemu hosts.

FWIW this is what the proposed metadef change looks like:


FWIW I think sahid and I figured out the right path forward. Before newton and the pointer_model option the use_usb_tablet option was only considered if the other dependent configs allowed it, so VNC or SPICE and HVM. If those failed, then we didn't try to force usbtablet on the guest and we didn't fail.

So we're going to do that same behavior but only if the image meta doesn't have hw_pointer_model='usbtablet'. So if the user specifically requests that behavior and we can't satisfy it, we fail and reschedule the build to another host. But don't break by default on environments like lxc/uml/xen/virtuozzo.



Matt Riedemann

OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

Reply via email to