Bug 1930530 - nova-compute fails with "TypeError: Parameterized generics cannot be used with class" with python 3.6 and libvirt-python 6.10.0
Summary: nova-compute fails with "TypeError: Parameterized generics cannot be used wit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 16.2 (Train)
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: Alpha
: 16.2 (Train on RHEL 8.4)
Assignee: melanie witt
QA Contact: James Parker
URL:
Whiteboard:
Depends On:
Blocks: 1930542
TreeView+ depends on / blocked
 
Reported: 2021-02-19 05:18 UTC by Sandeep Yadav
Modified: 2021-09-15 07:12 UTC (History)
10 users (show)

Fixed In Version: openstack-nova-20.5.1-2.20210219095047.42f8679.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1930542 (view as bug list)
Environment:
Last Closed: 2021-09-15 07:12:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1901383 0 None None None 2021-02-19 05:44:53 UTC
OpenStack gerrit 759831 0 None MERGED libvirt: Only ask tpool.Proxy to autowrap vir* classes 2021-02-19 06:00:20 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:12:58 UTC

Description Sandeep Yadav 2021-02-19 05:18:57 UTC
Description of problem:

we are facing below error with 16.2 On RHEL8.4:-

"ERROR oslo_service.service TypeError: Parameterized generics cannot be used with class or instance checks"

Logs:-
~~~
2021-02-19 04:00:37.680 7 ERROR oslo_service.service [-] Error starting thread.: TypeError: Parameterized generics cannot be used with class or instance checks
2021-02-19 04:00:37.680 7 ERROR oslo_service.service Traceback (most recent call last):
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/oslo_service/service.py", line 810, in run_service
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     service.start()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/service.py", line 174, in start
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     self.manager.init_host()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 1333, in init_host
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     self.driver.init_host(host=self.host)
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 656, in init_host
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     self._do_quality_warnings()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 622, in _do_quality_warnings
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     caps = self._host.get_capabilities()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/host.py", line 704, in get_capabilities
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     xmlstr = self.get_connection().getCapabilities()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/host.py", line 503, in get_connection
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     conn = self._get_connection()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/host.py", line 486, in _get_connection
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     {'msg': ex})
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     self.force_reraise()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     six.reraise(self.type_, self.value, self.tb)
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/six.py", line 675, in reraise
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     raise value
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/host.py", line 475, in _get_connection
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     self._wrapped_conn = self._get_new_connection()
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/host.py", line 429, in _get_new_connection
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     wrapped_conn = self._connect(self._uri, self._read_only)
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/host.py", line 285, in _connect
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     return self._libvirt_proxy.openAuth(uri, auth, flags)
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/eventlet/tpool.py", line 190, in doit
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     result = proxy_call(self._autowrap, f, *args, **kwargs)
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib/python3.6/site-packages/eventlet/tpool.py", line 149, in proxy_call
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     if isinstance(rv, autowrap):
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib64/python3.6/typing.py", line 1162, in __instancecheck__
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     return issubclass(instance.__class__, self)
2021-02-19 04:00:37.680 7 ERROR oslo_service.service   File "/usr/lib64/python3.6/typing.py", line 1148, in __subclasscheck__
2021-02-19 04:00:37.680 7 ERROR oslo_service.service     raise TypeError("Parameterized generics cannot be used with class "
2021-02-19 04:00:37.680 7 ERROR oslo_service.service TypeError: Parameterized generics cannot be used with class or instance checks
2021-02-19 04:00:37.680 7 ERROR oslo_service.service
~~~


Version-Release number of selected component (if applicable):

Openstack version: 16.2 
RHEL Version: 8.4
RPM Version: libvirt 6.10 and python 3.6

~~~
python36.x86_64                               3.6.8-2.module+el8.1.0+3334+5cb623d7            @rhosp-rhel-8.4-appstream     
python36-devel.x86_64                         3.6.8-2.module+el8.1.0+3334+5cb623d7            @rhosp-rhel-8.4-appstream
python3-libs.x86_64                           3.6.8-33.el8                                    @System     
 ~~~
 
Libvirt version inside nova containers:-
~~~
libvirt-admin                                x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           103 k
 libvirt-client                               x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           382 k
 libvirt-daemon                               x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           347 k
 libvirt-daemon-config-nwfilter               x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            69 k
 libvirt-daemon-driver-nwfilter               x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           226 k
 libvirt-bash-completion                      x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            62 k
 libvirt-daemon-driver-interface              x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           200 k
 libvirt-daemon-driver-network                x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           229 k
 libvirt-daemon-driver-nodedev                x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           202 k
 libvirt-daemon-driver-qemu                   x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           880 k
 libvirt-daemon-driver-secret                 x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           189 k
 libvirt-daemon-driver-storage                x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            62 k
 libvirt-daemon-driver-storage-core           x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           245 k
 libvirt-daemon-driver-storage-disk           x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            72 k
 libvirt-daemon-driver-storage-gluster        x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            75 k
 libvirt-daemon-driver-storage-iscsi          x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            69 k
 libvirt-daemon-driver-storage-iscsi-direct   x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            71 k
 libvirt-daemon-driver-storage-logical        x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            73 k
 libvirt-daemon-driver-storage-mpath          x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            67 k
 libvirt-daemon-driver-storage-rbd            x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            77 k
 libvirt-daemon-driver-storage-scsi           x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            69 k
 libvirt-daemon-kvm                           x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av            61 k
 libvirt-libs                                 x86_64  6.10.0-1.module+el8.4.0+8898+a84e86e1           rhosp-rhel-8.4-av           4.5 M
 ~~~
 
 Steps to Reproduce:
1. Deploy 16.2 Standalone with python 3.6 and libvirt-python 6.10.0

Actual results:

Deployment failing with "ERROR oslo_service.service TypeError: Parameterized generics cannot be used with class or instance checks"

Expected results:

Deployment should succeed.

Additional info:
Looks like we are hitting Upstream bug: https://bugs.launchpad.net/nova/+bug/1901383

Comment 18 errata-xmlrpc 2021-09-15 07:12:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483


Note You need to log in before you can comment on or make changes to this bug.