[Yahoo-eng-team] [Bug 1866106] Re: Can't set "pointer_model = None" in nova.conf

2020-03-04 Thread Matt Riedemann
** Changed in: oslo.config
   Status: New => Won't Fix

** Tags added: config libvirt

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1866106

Title:
  Can't set "pointer_model = None" in nova.conf

Status in OpenStack Compute (nova):
  In Progress
Status in oslo.config:
  Won't Fix

Bug description:
  Description
  ===

  nova.conf includes option pointer_model. The help text in the config
  has 2 "possible values" sections (copied below) specifying either
  "None" or "" as correct values. Neither of these is accepted by
  Nova. Here are the error messages from nova-compute.log:

  2020-03-03 11:05:17.233 228915 ERROR nova ConfigFileValueError: Value
  for option pointer_model is not valid: Valid values are [None,
  ps2mouse, usbtablet], but found ''

  2020-03-03 11:06:24.761 229290 ERROR nova ConfigFileValueError: Value
  for option pointer_model is not valid: Valid values are [None,
  ps2mouse, usbtablet], but found 'None'

  #
  # Generic property to specify the pointer type.
  #
  # Input devices allow interaction with a graphical framebuffer. For
  # example to provide a graphic tablet for absolute cursor movement.
  #
  # If set, the 'hw_pointer_model' image property takes precedence over
  # this configuration option.
  #
  # Possible values:
  #
  # * None: Uses default behavior provided by drivers (mouse on PS2 for
  # libvirt x86)
  # * ps2mouse: Uses relative movement. Mouse connected by PS2
  # * usbtablet: Uses absolute movement. Tablet connect by USB
  #
  # Related options:
  #
  # * usbtablet must be configured with VNC enabled or SPICE enabled and SPICE
  #   agent disabled. When used with libvirt the instance mode should be
  #   configured as HVM.
  #   (string value)
  # Possible values:
  #  - 
  # ps2mouse - 
  # usbtablet - 
  #pointer_model = usbtablet

  
  Steps to reproduce
  ==

  On an openstack hypervisor:
  1. Edit nova.conf and change line "#pointer_model = usbtablet" to either 
"pointer_model = None" or "pointer_model = "
  2. Restart nova-compute service
  3. Tail nova-compute.log

  Expected result
  ===

  Nova runs without errors and does not load the USB driver.

  Actual result
  =

  Nova throws the error described above.

  Environment
  ===

  1. Openstack version is Rocky:

  root@us01odc-p01-hv227:~#  dpkg -l | grep nova
  ii  nova-common   2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - common files
  ii  nova-compute  2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - compute node base
  ii  nova-compute-kvm  2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - compute node (KVM)
  ii  nova-compute-libvirt  2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - compute node libvirt support
  ii  python-nova   2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute Python 2 libraries
  ii  python-novaclient 2:11.0.0-0ubuntu1~cloud0
all  client library for OpenStack Compute API - Python 2.7

  2. Hypervisor: libvirt+KVM

  root@us01odc-p01-hv227:~# libvirtd --version
  libvirtd (libvirt) 4.0.0

  root@us01odc-p01-hv227:~# kvm --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.21)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

  3. Storage type: local LVM

  root@us01odc-p01-hv227:~# lvm version
LVM version: 2.02.176(2) (2017-11-03)
Library version: 1.02.145 (2017-11-03)
Driver version:  4.39.0
Configuration:   ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run 
--disable-maintainer-mode --disable-dependency-tracking --exec-prefix= 
--bindir=/bin --libdir=/lib/x86_64-linux-gnu --sbindir=/sbin 
--with-usrlibdir=/usr/lib/x86_64-linux-gnu --with-optimisation=-O2 
--with-cache=internal --with-clvmd=corosync --with-cluster=internal 
--with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 
--with-default-pid-dir=/run --with-default-run-dir=/run/lvm 
--with-default-locking-dir=/run/lock/lvm --with-thin=internal 
--with-thin-check=/usr/sbin/thin_check --with-thin-dump=/usr/sbin/thin_dump 
--with-thin-repair=/usr/sbin/thin_repair --enable-applib --enable-blkid_wiping 
--enable-cmdlib --enable-cmirrord --enable-dmeventd --enable-dbus-service 
--enable-lvmetad --enable-lvmlockd-dlm --enable-lvmlockd-sanlock 
--enable-lvmpolld --enable-notify-dbus 

[Yahoo-eng-team] [Bug 1866106] Re: Can't set "pointer_model = None" in nova.conf

2020-03-04 Thread Matt Riedemann
The problem is in oslo.config I think right here:

https://github.com/openstack/oslo.config/blob/20a7cee3e3019d60c4b367bb76922a1db41d1750/oslo_config/types.py#L142

That's coercing the value None to a string 'None' so it fails. According
to Ben Nemec:

(02:13:48 PM) bnemec: The only way for a config opt to have a None value is for 
that to be the default and for the opt to be unset.
(02:14:14 PM) bnemec: So completely absent from the file, not something like 
"opt="

But that seems like a bug because I would think that code could be
smarter about not coercing the value if the value is None, None is a
valid choice and a default is set (so you need to override the default).

** Also affects: oslo.config
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1866106

Title:
  Can't set "pointer_model = None" in nova.conf

Status in OpenStack Compute (nova):
  Confirmed
Status in oslo.config:
  New

Bug description:
  Description
  ===

  nova.conf includes option pointer_model. The help text in the config
  has 2 "possible values" sections (copied below) specifying either
  "None" or "" as correct values. Neither of these is accepted by
  Nova. Here are the error messages from nova-compute.log:

  2020-03-03 11:05:17.233 228915 ERROR nova ConfigFileValueError: Value
  for option pointer_model is not valid: Valid values are [None,
  ps2mouse, usbtablet], but found ''

  2020-03-03 11:06:24.761 229290 ERROR nova ConfigFileValueError: Value
  for option pointer_model is not valid: Valid values are [None,
  ps2mouse, usbtablet], but found 'None'

  #
  # Generic property to specify the pointer type.
  #
  # Input devices allow interaction with a graphical framebuffer. For
  # example to provide a graphic tablet for absolute cursor movement.
  #
  # If set, the 'hw_pointer_model' image property takes precedence over
  # this configuration option.
  #
  # Possible values:
  #
  # * None: Uses default behavior provided by drivers (mouse on PS2 for
  # libvirt x86)
  # * ps2mouse: Uses relative movement. Mouse connected by PS2
  # * usbtablet: Uses absolute movement. Tablet connect by USB
  #
  # Related options:
  #
  # * usbtablet must be configured with VNC enabled or SPICE enabled and SPICE
  #   agent disabled. When used with libvirt the instance mode should be
  #   configured as HVM.
  #   (string value)
  # Possible values:
  #  - 
  # ps2mouse - 
  # usbtablet - 
  #pointer_model = usbtablet

  
  Steps to reproduce
  ==

  On an openstack hypervisor:
  1. Edit nova.conf and change line "#pointer_model = usbtablet" to either 
"pointer_model = None" or "pointer_model = "
  2. Restart nova-compute service
  3. Tail nova-compute.log

  Expected result
  ===

  Nova runs without errors and does not load the USB driver.

  Actual result
  =

  Nova throws the error described above.

  Environment
  ===

  1. Openstack version is Rocky:

  root@us01odc-p01-hv227:~#  dpkg -l | grep nova
  ii  nova-common   2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - common files
  ii  nova-compute  2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - compute node base
  ii  nova-compute-kvm  2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - compute node (KVM)
  ii  nova-compute-libvirt  2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute - compute node libvirt support
  ii  python-nova   2:18.2.1-0ubuntu1~cloud4
all  OpenStack Compute Python 2 libraries
  ii  python-novaclient 2:11.0.0-0ubuntu1~cloud0
all  client library for OpenStack Compute API - Python 2.7

  2. Hypervisor: libvirt+KVM

  root@us01odc-p01-hv227:~# libvirtd --version
  libvirtd (libvirt) 4.0.0

  root@us01odc-p01-hv227:~# kvm --version
  QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.21)
  Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

  3. Storage type: local LVM

  root@us01odc-p01-hv227:~# lvm version
LVM version: 2.02.176(2) (2017-11-03)
Library version: 1.02.145 (2017-11-03)
Driver version:  4.39.0
Configuration:   ./configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run 
--disable-maintainer-mode --disable-dependency-tracking --exec-prefix= 
--bindir=/bin --libdir=/lib/x86_64-linux-gnu --sbindir=/sbin