"test_add_and_remove_metering_label_rule_src_and_dest_ip_only" failing in py39

Bug #1930222 reported by Rodolfo Alonso
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
High
Unassigned
Wallaby
Fix Released
High
Unassigned
neutron
Fix Released
High
Unassigned
neutron (Ubuntu)
Fix Released
High
Unassigned
Hirsute
Fix Released
High
Unassigned
Impish
Fix Released
High
Unassigned

Bug Description

Log: https://89a2790c32b5ab9dcbfe-375c96d2b682bc8bc02e09d31e738426.ssl.cf5.rackcdn.com/791365/7/check/openstack-tox-py39/d3a256a/testr_results.html

Snippet: http://paste.openstack.org/show/805859/

== Ubuntu SRU details ==

[Impact]
Test fails during package build.

[Test Case]
Successful execution of tests during package build.

[Regression Potential]
This patch fixes a test case only.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Python3.9 "ipaddress.ip_interface" does not support leading zeroes:
>>> ipaddress.ip_interface('00.0.0.0/0')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/ipaddress.py", line 118, in ip_interface
    raise ValueError('%r does not appear to be an IPv4 or IPv6 interface' %
ValueError: '00.0.0.0/0' does not appear to be an IPv4 or IPv6 interface

The class called from "ipaddress.ip_interface":
>>> ipaddress.IPv4Interface('00.0.0.0/0')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/ipaddress.py", line 1390, in __init__
    IPv4Address.__init__(self, addr)
  File "/usr/lib/python3.9/ipaddress.py", line 1307, in __init__
    self._ip = self._ip_int_from_string(addr_str)
  File "/usr/lib/python3.9/ipaddress.py", line 1199, in _ip_int_from_string
    raise AddressValueError("%s in %r" % (exc, ip_str)) from None
ipaddress.AddressValueError: Leading zeros are not permitted in '00' in '00.0.0.0'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/793772

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/793772
Committed: https://opendev.org/openstack/neutron/commit/b141aed51296fd6564ccce18f907dc1913a4bc5b
Submitter: "Zuul (22348)"
Branch: master

commit b141aed51296fd6564ccce18f907dc1913a4bc5b
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon May 31 11:41:04 2021 +0000

    Remove leading zeroes from an IP address

    In python3.9, ipaddress.IPv4Interface does not support defining an
    IP address with leading zeroes. E.g.:

    >>> ipaddress.IPv4Interface('00.0.0.0/0')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.9/ipaddress.py", line 1390, in __init__
        IPv4Address.__init__(self, addr)
      File "/usr/lib/python3.9/ipaddress.py", line 1307, in __init__
        self._ip = self._ip_int_from_string(addr_str)
      File "/usr/lib/python3.9/ipaddress.py", line 1199, in
    _ip_int_from_string
        raise AddressValueError("%s in %r" % (exc, ip_str)) from None
    ipaddress.AddressValueError: Leading zeros are not permitted in '00' in
    '00.0.0.0'

    Change-Id: I29137b22c158e979e81be9e41464948aa99f5498
    Closes-Bug: #1930222

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/794617

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/794618

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/794617
Committed: https://opendev.org/openstack/neutron/commit/50fd545ee8d40f70c9b2b680360c4a2e1b9e95b7
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 50fd545ee8d40f70c9b2b680360c4a2e1b9e95b7
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon May 31 11:41:04 2021 +0000

    Remove leading zeroes from an IP address

    In python3.9, ipaddress.IPv4Interface does not support defining an
    IP address with leading zeroes. E.g.:

    >>> ipaddress.IPv4Interface('00.0.0.0/0')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.9/ipaddress.py", line 1390, in __init__
        IPv4Address.__init__(self, addr)
      File "/usr/lib/python3.9/ipaddress.py", line 1307, in __init__
        self._ip = self._ip_int_from_string(addr_str)
      File "/usr/lib/python3.9/ipaddress.py", line 1199, in
    _ip_int_from_string
        raise AddressValueError("%s in %r" % (exc, ip_str)) from None
    ipaddress.AddressValueError: Leading zeros are not permitted in '00' in
    '00.0.0.0'

    Change-Id: I29137b22c158e979e81be9e41464948aa99f5498
    Closes-Bug: #1930222
    (cherry picked from commit b141aed51296fd6564ccce18f907dc1913a4bc5b)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/794618
Committed: https://opendev.org/openstack/neutron/commit/9b5a3b02a6d2da4e9e03db61bff445609642d9b6
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 9b5a3b02a6d2da4e9e03db61bff445609642d9b6
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon May 31 11:41:04 2021 +0000

    Remove leading zeroes from an IP address

    In python3.9, ipaddress.IPv4Interface does not support defining an
    IP address with leading zeroes. E.g.:

    >>> ipaddress.IPv4Interface('00.0.0.0/0')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.9/ipaddress.py", line 1390, in __init__
        IPv4Address.__init__(self, addr)
      File "/usr/lib/python3.9/ipaddress.py", line 1307, in __init__
        self._ip = self._ip_int_from_string(addr_str)
      File "/usr/lib/python3.9/ipaddress.py", line 1199, in
    _ip_int_from_string
        raise AddressValueError("%s in %r" % (exc, ip_str)) from None
    ipaddress.AddressValueError: Leading zeros are not permitted in '00' in
    '00.0.0.0'

    Change-Id: I29137b22c158e979e81be9e41464948aa99f5498
    Closes-Bug: #1930222
    (cherry picked from commit b141aed51296fd6564ccce18f907dc1913a4bc5b)

tags: added: in-stable-victoria
Changed in neutron (Ubuntu Hirsute):
status: New → Triaged
importance: Undecided → High
Changed in neutron (Ubuntu Impish):
importance: Undecided → High
status: New → Triaged
no longer affects: cloud-archive/xena
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Rodolfo, or anyone else affected,

Accepted neutron into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/neutron/2:18.0.0-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in neutron (Ubuntu Hirsute):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Rodolfo, or anyone else affected,

Accepted neutron into wallaby-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:wallaby-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-wallaby-needed to verification-wallaby-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-wallaby-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-archive:
status: Triaged → Fix Committed
tags: added: verification-wallaby-needed
tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
Revision history for this message
Brian Murray (brian-murray) wrote :

Given that the following appears in the buildlog for the package in hirsute-proposed (and that it built!) I'm setting this to verification done.

neutron.tests.unit.services.metering.test_metering_plugin.TestMeteringPlugin.test_add_and_remove_metering_label_rule_src_and_dest_ip_only
neutron.tests.unit.services.metering.test_metering_plugin.TestMeteringPlugin.test_add_and_remove_metering_label_rule_src_and_dest_ip_only ... ok

tags: added: verification-done verification-done-hirsute
removed: verification-needed verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron - 2:18.0.0-0ubuntu2.1

---------------
neutron (2:18.0.0-0ubuntu2.1) hirsute; urgency=medium

  * d/gbp.conf: Create stable/wallaby branch.
  * d/p/revert-rely-on-worker-count-for-hashring-caching.patch: Revert
    patch due to SR-IOV regression (LP: #1931244).
  * d/p/remove-leading-zeroes-from-an-ip-address.patch: Cherry-picked from
    upstream to fix failing test (LP: #1930222).

 -- Corey Bryant <email address hidden> Tue, 08 Jun 2021 10:52:23 -0400

Changed in neutron (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for neutron has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :
tags: added: verification-wallaby-done
removed: verification-wallaby-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package neutron - 2:18.0.0-0ubuntu3~cloud0
---------------

 neutron (2:18.0.0-0ubuntu3~cloud0) focal-xena; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron (2:18.0.0-0ubuntu3) impish; urgency=medium
 .
   * d/p/revert-rely-on-worker-count-for-hashring-caching.patch: Revert
     patch due to SR-IOV regression (LP: #1931244).
   * d/p/remove-leading-zeroes-from-an-ip-address.patch: Cherry-picked from
     upstream to fix failing test (LP: #1930222).

Changed in cloud-archive:
status: Fix Committed → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for neutron has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package neutron - 2:18.0.0-0ubuntu2.1~cloud0
---------------

 neutron (2:18.0.0-0ubuntu2.1~cloud0) focal-wallaby; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron (2:18.0.0-0ubuntu2.1) hirsute; urgency=medium
 .
   * d/gbp.conf: Create stable/wallaby branch.
   * d/p/revert-rely-on-worker-count-for-hashring-caching.patch: Revert
     patch due to SR-IOV regression (LP: #1931244).
   * d/p/remove-leading-zeroes-from-an-ip-address.patch: Cherry-picked from
     upstream to fix failing test (LP: #1930222).

Changed in neutron (Ubuntu Impish):
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 17.2.0

This issue was fixed in the openstack/neutron 17.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.1.0

This issue was fixed in the openstack/neutron 18.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 19.0.0.0rc1

This issue was fixed in the openstack/neutron 19.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.