Browse code

Tighten up parsing of neutron tap device for ironic

The current parsing of the interfaces from the neutron network namespace
fails if there are other things that match 'tap' (ie, gretaps created
for other purposes) This tightens up the parsing to only match devices
starting 'tap' instead of anything containing 'tap'

Change-Id: I9a31ec8ad253da0b3c5bd7f5eb105c49850f3060

Adam Gandelman authored on 2014/12/03 09:49:14
Showing 1 changed files
... ...
@@ -460,7 +460,7 @@ function create_ovs_taps {
460 460
     # intentional sleep to make sure the tag has been set to port
461 461
     sleep 10
462 462
 
463
-    local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep tap | cut -d':' -f2 | cut -b2-)
463
+    local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -b2-)
464 464
     local tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)
465 465
 
466 466
     # make sure veth pair is not existing, otherwise delete its links