'IPDB' object has no attribute 'interface' in utils.remove_device

Bug #1631819 reported by Liping Mao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kuryr
Fix Released
Undecided
Liping Mao

Bug Description

IPDB only have 'interfaces' attribute, we miss spelling it to 'interface' in utils.remove_device, this will cause it failed when call function "remove_device" in utils.py

Here is a sample:

vagrant@devstack:/opt/stack/kuryr/kuryr/lib/binding/drivers$ docker run -it --net=test1 busybox
docker: Error response from daemon: NetworkDriver.Join: 'IPDB' object has no attribute 'interface'.

2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork [-] Exception on /NetworkDriver.Join [POST]
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork Traceback (most recent call last):
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork response = self.full_dispatch_request()
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork rv = self.handle_user_exception(e)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork reraise(exc_type, exc_value, tb)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork rv = self.dispatch_request()
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork return self.view_functions[rule.endpoint](**req.view_args)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/opt/stack/kuryr-libnetwork/kuryr_libnetwork/controllers.py", line 928, in network_driver_join
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork json_data = flask.request.get_json(force=True)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/opt/stack/kuryr/kuryr/lib/binding/__init__.py", line 38, in port_bind
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork nested_port=nested_port)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/opt/stack/kuryr/kuryr/lib/binding/drivers/veth.py", line 88, in port_bind
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork utils.remove_device(host_ifname)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/opt/stack/kuryr/kuryr/lib/binding/drivers/utils.py", line 63, in remove_device
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork dev_index = ip.interface.get(ifname, {}).get('index', None)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork File "/usr/local/lib/python2.7/dist-packages/pyroute2/ipdb/main.py", line 702, in __getattribute__
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork return super(IPDB, self).__getattribute__(name)
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork AttributeError: 'IPDB' object has no attribute 'interface'
2016-10-10 00:31:54.643 21506 ERROR kuryr_libnetwork
[2016-10-10 00:31:54,645] ERROR in utils: Unexpected error happened: 'IPDB' object has no attribute 'interface'

Liping Mao (limao)
Changed in kuryr:
assignee: nobody → Liping Mao (limao)
Changed in kuryr:
status: New → In Progress
Liping Mao (limao)
summary: - NetworkDriver.Join: 'IPDB' object has no attribute 'interface'.
+ 'IPDB' object has no attribute 'interface' in utils.remove_device
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr (master)

Reviewed: https://review.openstack.org/384249
Committed: https://git.openstack.org/cgit/openstack/kuryr/commit/?id=2f5fcc99268606de2e3b2fad757009531246938e
Submitter: Jenkins
Branch: master

commit 2f5fcc99268606de2e3b2fad757009531246938e
Author: Liping Mao <email address hidden>
Date: Mon Oct 10 09:02:35 2016 +0800

    'IPDB' object has no attribute 'interface' in utils.remove_device

    Change-Id: I7068651572f4781ebf7f8cd954730f6a4c30dab3
    Closes-bug: #1631819

Changed in kuryr:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kuryr 0.2.0

This issue was fixed in the openstack/kuryr 0.2.0 release.

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.