netaddr 0.7.5 raises UnboundLocalError

Bug #1157058 reported by Alexej Ababilov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Alexej Ababilov

Bug Description

Test job http://logs.openstack.org/21491/2/check/gate-nova-python26/18946/testr_results.html.gz failed with trace:

ft608.12: nova.tests.test_utils.GenericUtilsTestCase.test_get_shortened_ipv6_cidr_StringException: Empty attachments:
  pythonlogging:'nova'
  stderr
  stdout

Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-nova-python26/nova/tests/test_utils.py", line 530, in test_get_shortened_ipv6_cidr
    "127.0.0.1")
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 394, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 406, in assertThat
    mismatch = matcher.match(matchee)
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/matchers/_exception.py", line 97, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/matchers/_higherorder.py", line 61, in match
    mismatch = matcher.match(matchee)
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 386, in match
    reraise(*matchee)
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/matchers/_exception.py", line 90, in match
    result = matchee()
  File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 846, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/home/jenkins/workspace/gate-nova-python26/nova/utils.py", line 916, in get_shortened_ipv6_cidr
    net = netaddr.IPNetwork(address, version=6)
  File "/usr/lib/python2.6/dist-packages/netaddr/ip/__init__.py", line 906, in __init__
    implicit_prefix=implicit_prefix, flags=flags)
  File "/usr/lib/python2.6/dist-packages/netaddr/ip/__init__.py", line 782, in parse_ip_network
    value = ip._value
UnboundLocalError: local variable 'ip' referenced before assignment

This issue is discussed here: https://github.com/drkjam/netaddr/issues/2.
The bug in netaddr was fixed in 0.7.6 on 13th Sep 2011.

Need to require at least this version in pip-requires.

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

Fix proposed to branch: master
Review: https://review.openstack.org/24769

Changed in nova:
assignee: nobody → Alessio Ababilov (aababilov)
status: New → In Progress
Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

For reference, this has been patched in netaddr RHEL/Centos/Fedora/... for a while: https://bugzilla.redhat.com/710373

Also ubuntu is patched since precise

so I'm a bit confused as to which env is picking up such an old netaddr?

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

Reviewed: https://review.openstack.org/24769
Committed: http://github.com/openstack/nova/commit/96c874cac5f9bd20f322d01404eaf378b8333eb5
Submitter: Jenkins
Branch: master

commit 96c874cac5f9bd20f322d01404eaf378b8333eb5
Author: Alessio Ababilov <email address hidden>
Date: Tue Mar 19 11:25:14 2013 +0200

    Require netaddr>=0.7.6 to avoid UnboundLocalError

    This issue is discussed at https://github.com/drkjam/netaddr/issues/2.
    The bug in netaddr was fixed in release 0.7.6 on 13th Sep 2011.

    Change-Id: Iea75a30963a09f9b0dd94138460bf041ab98fc66
    Fixes: bug #1157058

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.