Bug 2234825 - python3-gunicorn is not compatible with RHEL-8 python3-gevent
Summary: python3-gunicorn is not compatible with RHEL-8 python3-gevent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-gunicorn
Version: epel8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-25 14:45 UTC by marco.angaroni
Modified: 2023-09-07 01:07 UTC (History)
3 users (show)

Fixed In Version: python-gunicorn-20.0.4-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-07 01:07:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description marco.angaroni 2023-08-25 14:45:01 UTC
Description of problem:


there is an incompatibility between the following RPMS:

python3-gevent-1.2.2-4.el8.x86_64       (from Appstream RHEL-8)
python3-gunicorn-20.0.4-2.el8.noarch    (from EPEL-8)

in gunicorn you can define a worker of type gevent.
however that version of gunicorn requires gevent > 1.4, which is higher than the version provided in RHEL-8.

the check is embedded in gunicorn code (/usr/lib/python3.6/site-packages/gunicorn/workers/ggevent.py):

    from pkg_resources import parse_version
    if parse_version(gevent.__version__) < parse_version('1.4'):
        raise RuntimeError("gevent worker requires gevent 1.4 or higher") 


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


20.0.4-2.el8


How reproducible:


start any application under gunicorn with gevent worker class, ex.:

gunicorn --bind=0.0.0.0:8000 --workers=1 --worker-class=gevent "my_project:create_app()"

will cause: RuntimeError: gevent worker requires gevent 1.4 or higher

Comment 1 Carl George 🤠 2023-08-31 22:17:21 UTC
I think I've narrowed down the problem here.

The upstream project added a runtime check for gevent 1.4 in gunicorn 20.0.0 [0][1].  However, they didn't enforce this minimum version at install time in setup.py until gunicorn 20.1.0, which is also when they added tests to ensure the different workers are importable [2][3].  This resulted in gunicorn 20.0.4 being added to EPEL 8, even though RHEL 8 only has gevent 1.2.2.  We should be able to fix this by reverting the upstream changes for the gevent 1.4 runtime check.  It's also worthwhile to backport the worker import checks at the same time.

I've made this change [4], and it should show up in the epel-testing repo tonight.

[0] https://github.com/benoitc/gunicorn/pull/1962
[1] https://github.com/benoitc/gunicorn/commit/9f87c88819b901d4cd8ddf6c2bba1198b68903cb
[2] https://github.com/benoitc/gunicorn/pull/2230
[3] https://github.com/benoitc/gunicorn/commit/2d40e6daceb9735d27bb91d9c32743695de8e01c
[4] https://src.fedoraproject.org/rpms/python-gunicorn/pull-request/5

Comment 2 Fedora Update System 2023-08-31 22:17:34 UTC
FEDORA-EPEL-2023-fb827fada8 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-fb827fada8

Comment 3 Fedora Update System 2023-09-01 01:56:18 UTC
FEDORA-EPEL-2023-fb827fada8 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-fb827fada8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2023-09-07 01:07:37 UTC
FEDORA-EPEL-2023-fb827fada8 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.


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