On Linux kernel 4.1, `ip link` reports peer interface name for
each Open vSwitch interface, like:
$ ip link
...
71: ovs-tap1@brbm-tap1: <BROADCAST,MULTICAST,UP,LOWER_UP> ...
~~~~~~~~~~
Currently it is regarded as a part of interface name, so
causes failure in tap id detection from ovs-vsctl output,
that results into ironic deployment failure.
This patch removes the peer name from the interface name.
Change-Id: Id3b181fa821e9bff1afabef4d63964f61fa49a65
Closes-Bug: #1486273
... | ... |
@@ -505,9 +505,9 @@ function create_ovs_taps { |
505 | 505 |
sleep 10 |
506 | 506 |
|
507 | 507 |
if [[ "$Q_USE_NAMESPACE" = "True" ]]; then |
508 |
- local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -b2-) |
|
508 |
+ local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-) |
|
509 | 509 |
else |
510 |
- local tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -b2-) |
|
510 |
+ local tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-) |
|
511 | 511 |
fi |
512 | 512 |
local tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-) |
513 | 513 |
|