use_usb_tablet and pointer_model have different defaults making switching hard

Bug #1621582 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Sahid Orentino

Bug Description

The use_usb_tablet config option is deprecated in Newton and replaced with the pointer_model config option. The use_usb_tablet option defaults to True, and pointer_model defaults to None, and the only choices are None and 'usbtablet'.

If pointer_model is not set, then use_usb_tablet is used as a fallback while transitioning to the new pointer_model option.

The problem is they have different default values/behaviors.

Currently devstack sets use_usb_tablet=False, which gives us warnings in CI runs because the option is deprecated. But changing it to None will make the nova code fallback to CONF.use_usb_tablet:

https://github.com/openstack/nova/blob/df15e467b61fee781e78b07bf910d6b411bafd44/nova/virt/libvirt/driver.py#L4541

So you can't just remove using use_usb_tablet if you want it disabled (set to False) because the code will use the default and set it to True.

I tried setting pointer_model to '' to get around the None check in the nova code, but that fails because we're using choices with the config option so only None and 'usbtablet' are allowed:

http://logs.openstack.org/26/367526/1/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/1479bdd/logs/screen-n-api.txt.gz?level=TRACE#_2016-09-08_17_31_42_490

This makes the transition from use_usb_tablet to pointer_model hard for anyone that wants this set to False like devstack does.

We could allow setting '' as a choice for pointer_model to workaround this until use_usb_tablet is gone. We could also default use_usb_tablet to False to mimic pointer_model, but that's a change in default behavior without any warning for a release.

We could also just ignore this and drop use_usb_tablet in Ocata and anyone that was setting it in nova.conf will just not have it picked up and used, but that's annoying for anyone that wants to get ahead of cleaning out deprecation warnings before upgrading to ocata.

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
Matt Riedemann (mriedem)
tags: added: newton-rc-potential
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
Changed in nova:
assignee: nobody → sahid (sahid-ferdjaoui)
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/367909

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/367909
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f04dd04342705c8dc745308662b698bb54debf69
Submitter: Jenkins
Branch: master

commit f04dd04342705c8dc745308662b698bb54debf69
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Fri Sep 9 05:55:39 2016 -0400

    libvirt: add ps2mouse in choice for pointer_model

    This commit adds option ps2mouse to pointer_model, and set the default
    value of pointer_model to usbtablet to do not break upgrade regarding
    the default behavior of use_usb_tablet.

    WHY: use_usb_tablet is by default set to True and during the
    deprecation phase of use_usb_tablet, operators which have set that
    option to false can't have the same behavior by using pointer_model
    since use_usb_tablet takes precedence. Now operators can use
    pointer_model=ps2mouse.

    Change-Id: Id18b5503799922e4096bde296a9e7bb4f2a994aa
    Closes-Bug: #1621582

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.0.0rc1

This issue was fixed in the openstack/nova 14.0.0.0rc1 release candidate.

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.