OVS-agent: TypeError: unhashable type: 'list'

Bug #1444269 reported by YAMAMOTO Takashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Kevin Benton
Kilo
New
Undecided
Unassigned
Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

it seems that, when the agent queries the db, ofport column is still not set yet.

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

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

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/173704
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e7e2609fae70dbffa0ddbf37c7804587e216648c
Submitter: Jenkins
Branch: master

commit e7e2609fae70dbffa0ddbf37c7804587e216648c
Author: Kevin Benton <email address hidden>
Date: Mon Mar 30 20:29:51 2015 -0700

    Handle no ofport in get_vif_port_to_ofport_map

    Newly added ports to OVSDB might not yet have an
    ofport number assigned to them. This causes the
    return from the DB query to return a list instead
    of a port number.

    This patch handles that by attempting to convert
    each result into an integer and then catching the
    exception and continuing through the iteration to
    ignore uninitialized ports like these.

    It also adds a unit test based on data from a
    failure observed in the gate.

    Change-Id: I5c1bc8363cc7b07a03df12e3ccd49a09b1907ad2
    Closes-Bug: #1444269

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/177049

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

Fix proposed to branch: neutron-pecan
Review: https://review.openstack.org/185072

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

Reviewed: https://review.openstack.org/177049
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1c1981e3ce16e73499bf3f9064e7f366c057ab74
Submitter: Jenkins
Branch: stable/kilo

commit 1c1981e3ce16e73499bf3f9064e7f366c057ab74
Author: Kevin Benton <email address hidden>
Date: Mon Mar 30 20:29:51 2015 -0700

    Handle no ofport in get_vif_port_to_ofport_map

    Newly added ports to OVSDB might not yet have an
    ofport number assigned to them. This causes the
    return from the DB query to return a list instead
    of a port number.

    This patch handles that by attempting to convert
    each result into an integer and then catching the
    exception and continuing through the iteration to
    ignore uninitialized ports like these.

    It also adds a unit test based on data from a
    failure observed in the gate.

    Change-Id: I5c1bc8363cc7b07a03df12e3ccd49a09b1907ad2
    Closes-Bug: #1444269
    (cherry picked from commit e7e2609fae70dbffa0ddbf37c7804587e216648c)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → 7.0.0
Revision history for this message
cronay walls (cronywalls) wrote :

The hash() is a built-in python method, used to return a unique number . This can be applied to any user-defined object which won’t get changed once initialized. This property is used mainly in dictionary keys .

TypeError: unhashable type: 'list' usually means that you are trying to use a list as an hash argument. This means that when you try to hash an unhashable object it will result an error. For ex. when you use a list as a key in the dictionary , this cannot be done because lists can't be hashed. The standard way to solve this issue is to cast a list to a tuple .

http://net-informations.com/python/iq/unhashable.htm

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.