Bug 2119256 - [Ceph-mgr] Module 'restful' has failed dependency: No module named 'dataclasses'
Summary: [Ceph-mgr] Module 'restful' has failed dependency: No module named 'dataclasses'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Mgr Plugins
Version: 5.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 5.3
Assignee: Ken Dreyer (Red Hat)
QA Contact: Sunil Angadi
ceph-docs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-18 05:14 UTC by Sunil Angadi
Modified: 2023-01-11 17:42 UTC (History)
6 users (show)

Fixed In Version: python-werkzeug-2.0.3-3.el8cp
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-11 17:41:19 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-5108 0 None None None 2022-08-18 05:15:38 UTC
Red Hat Product Errata RHSA-2023:0076 0 None None None 2023-01-11 17:42:03 UTC

Comment 3 Ken Dreyer (Red Hat) 2022-08-22 16:50:07 UTC
This looks like it could be related to the werkzeug + dataclasses update in https://bugzilla.redhat.com/show_bug.cgi?id=2053446

Comment 4 Ken Dreyer (Red Hat) 2022-08-22 17:26:09 UTC
During the container build process, DNF installs python3-werkzeug-2.0.3 (for bug 2053446) but it does not pull in python3-dataclasses. Likewise, our CI composes have the new python3-werkzeug 2.0.3 package but they do not have the python3-dataclasses package. The problem is that the werkzeug RPM lacks the dataclasses package requirement here:

$ rpm -q --requires python3-werkzeug-2.0.3-1.el8cp.noarch
python(abi) = 3.6
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

RPM is supposed to automatically add dataclasses to this list, since the package cannot function without it, as in this test:

>>> import werkzeug
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/werkzeug/__init__.py", line 2, in <module>
    from .test import Client as Client
  File "/usr/lib/python3.6/site-packages/werkzeug/test.py", line 30, in <module>
    from .sansio.multipart import Data
  File "/usr/lib/python3.6/site-packages/werkzeug/sansio/multipart.py", line 2, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'


My theory is that RHEL 8's python3-rpm-macros-3-41.el8 might not be able to parse this ":python_version" syntax in Werkzeug-2.0.3-py3.6.egg-info/requires.txt:

  [:python_version < "3.7"]
  dataclasses

At any rate, I've added an explicit Requires line to python-werkzeug-2.0.3-3: https://pkgs.devel.redhat.com/cgit/rpms/python-werkzeug/commit/?h=ceph-5.3-rhel-8&id=292f1b5a06ca530d6d2ceaf93e802f5440e7dd66

Comment 13 errata-xmlrpc 2023-01-11 17:41:19 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 (Moderate: Red Hat Ceph Storage 5.3 security update and Bug Fix), 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/RHSA-2023:0076


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