return key error when start container with kuryr binding veth driver
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kuryr |
Fix Released
|
Undecided
|
Liping Mao |
Bug Description
Environment:
kuryr-libnetwork with kuryr veth binding driver. then start a container, get the following error log.
Error Log:
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork [-] Exception on /NetworkDriver.Join [POST]
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork Traceback (most recent call last):
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/usr/local/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork response = self.full_
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/usr/local/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork rv = self.handle_
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/usr/local/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork reraise(exc_type, exc_value, tb)
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/usr/local/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork rv = self.dispatch_
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/usr/local/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork return self.view_
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/opt/stack/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork endpoint_id, neutron_port, all_subnets, filtered_
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/opt/stack/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork nested_
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork File "/opt/stack/
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork with ip.interfaces[
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork KeyError: u't_c640333a0-e4'
2016-10-09 14:01:31.923 17170 ERROR kuryr_libnetwork
[2016-10-09 14:01:31,923] ERROR in utils: Unexpected error happened: u't_c640333a0-e4'
This is because wrong logical in veth driver, should not use nested with here.
63 with ip.create(
64 reuse=True, peer=container_
65 if not utils.is_
66 host_veth.up()
67 -> with ip.interfaces[
68 utils._
69 container_veth, subnets,
70 fixed_ips=
71 mtu=mtu, hwaddr=
72 except pyroute2.
(Pdb) p container_ifname
u't_c640333a0-e4'
(Pdb) p ip.interfaces[
*** KeyError: KeyError(
Changed in kuryr: | |
assignee: | nobody → Liping Mao (limao) |
Changed in kuryr: | |
status: | New → In Progress |
Reviewed: https:/ /review. openstack. org/384248 /git.openstack. org/cgit/ openstack/ kuryr/commit/ ?id=2740f78b9c6 0fa1e20c80cc3bf 0dc65c09b8bf0a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2740f78b9c60fa1 e20c80cc3bf0dc6 5c09b8bf0a
Author: Liping Mao <email address hidden>
Date: Mon Oct 10 08:58:59 2016 +0800
return key error when start container with kuryr binding veth driver
the veth should be created before we call ip.interfaces[ container_ ifname] .
Change-Id: Ifc56317433f369 1841411be63e5e5 f5ab56aeacf
Closes-bug: #1631817