RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2075187 - zone transfer issues due to bug trying to compare nonetype with float
Summary: zone transfer issues due to bug trying to compare nonetype with float
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-dns
Version: CentOS Stream
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Charalampos Stratakis
QA Contact: Lukáš Zachar
URL:
Whiteboard:
: 2233061 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-13 18:55 UTC by Tobias Urdin
Modified: 2023-08-22 14:57 UTC (History)
5 users (show)

Fixed In Version: python-dns-1.15.0-11.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 10:45:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2075187 0 unspecified CLOSED zone transfer issues due to bug trying to compare nonetype with float 2023-09-22 09:41:29 UTC
Red Hat Issue Tracker FREEIPA-8163 0 None None None 2022-04-13 19:05:51 UTC
Red Hat Issue Tracker RHELPLAN-118893 0 None None None 2022-04-13 19:05:55 UTC
Red Hat Product Errata RHBA-2022:7697 0 None None None 2022-11-08 10:45:45 UTC

Internal Links: 2075187 2233061

Description Tobias Urdin 2022-04-13 18:55:15 UTC
Description of problem:

The python3-dns package has a bug where it tries to do a compare between a float and an nonetype causing issues. This causes zone transfer issues in the OpenStack Designate project which is using python3-dns

This is only present in CentOS Stream 8 because it's running version 1.15 where the bug is resolved in >= 2.0.0

See bug report in https://bugs.launchpad.net/designate/+bug/1941988

Version-Release number of selected component (if applicable): python3-dns-1.15.0-10.el8.noarch


How reproducible:
See reproduce in https://bugs.launchpad.net/designate/+bug/1941988


Actual results:
Python exception trying to compare float > nonetype

Expected results:
No error, instead checking value for nonetype before comparing

Additional info:
courtasy patch to solve issue as describe in https://bugs.launchpad.net/designate/+bug/1941988 and fixed in https://github.com/rthalley/dnspython/blob/v2.0.0rc1/dns/query.py#L925

From 2e2ee980ab0fdbf0574b67c415756ba79304ac5a Mon Sep 17 00:00:00 2001
From: Tobias Urdin <tobias.urdin>
Date: Wed, 13 Apr 2022 18:50:12 +0000
Subject: [PATCH] Fix operator compare between NoneType and float

---
 dns/query.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dns/query.py b/dns/query.py
index bfecd43..19b9fbb 100644
--- a/dns/query.py
+++ b/dns/query.py
@@ -467,7 +467,8 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
     first = True
     while not done:
         mexpiration = _compute_expiration(timeout)
-        if mexpiration is None or mexpiration > expiration:
+        if mexpiration is None or \
+           (expiration is not None and mexpiration > expiration):
             mexpiration = expiration
         if use_udp:
             _wait_for_readable(s, expiration)

Comment 1 Tobias Urdin 2022-04-13 18:58:15 UTC
Not an issue in CentOS Stream 9 since that uses a version that already has the fix

Comment 2 Charalampos Stratakis 2022-04-20 23:50:27 UTC
Upstream fix: https://github.com/rthalley/dnspython/commit/9fbf9b223dc26262b1cf23f623f89283ee9c8375

Comment 10 errata-xmlrpc 2022-11-08 10:45:43 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 (python-dns bug fix and enhancement update), 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/RHBA-2022:7697

Comment 11 Michael Johnson 2023-08-22 14:55:34 UTC
*** Bug 2233061 has been marked as a duplicate of this bug. ***


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