From 0612b485d3646e40ea0f70dfaadd7705a2b10c71 Mon Sep 17 00:00:00 2001 From: Tomoki Sekiyama Date: Tue, 18 Aug 2015 18:51:24 -0400 Subject: [PATCH] Ironic: Fix tag ID detection of tap devices On Linux kernel 4.1, `ip link` reports peer interface name for each Open vSwitch interface, like: $ ip link ... 71: ovs-tap1@brbm-tap1: ... ~~~~~~~~~~ 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 --- lib/ironic | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ironic b/lib/ironic index b3ad586923..d9c3396944 100644 --- a/lib/ironic +++ b/lib/ironic @@ -505,9 +505,9 @@ function create_ovs_taps { sleep 10 if [[ "$Q_USE_NAMESPACE" = "True" ]]; then - local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -b2-) + local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-) else - local tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -b2-) + local tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -d'@' -f1 | cut -b2-) fi local tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)