Fix bash cmd used in scenario trunk tests

In scenario trunk test test_subport_connectivity there
is bash command used to check name of base interface on
spawned vm (e.g. ens3 or eth0), configure vlan interface
with vlan_id used on trunk port (e.g. ens3.10),
make this vlan device up and run dhclient on this interface
if it's not running yet.

This command was broken and that cause failure of this test.

Change-Id: I4c0207f79cd6df2594f976b9509697209011edf2
Closes-Bug: #1766701
This commit is contained in:
Slawek Kaplonski 2018-09-12 02:01:31 +02:00
parent 5247e03ef3
commit 6bf840f0a7
1 changed files with 5 additions and 9 deletions

View File

@ -29,13 +29,11 @@ LOG = logging.getLogger(__name__)
CONF = config.CONF
CONFIGURE_VLAN_INTERFACE_COMMANDS = (
'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e" |'
'cut -d \: -f 2) && '
'sudo su -c '
'"ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
'ip l s up dev $IFACE.%(tag)d && '
'{ ps -ef | grep -q "dhclient .*$IFACE.%(tag)d" || '
'dhclient $IFACE.%(tag)d"; }')
'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e"|cut -d \: -f 2) &&'
'sudo ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
'sudo ip l s up dev $IFACE.%(tag)d && '
'ps -ef | grep -q "[d]hclient .*$IFACE.%(tag)d" || '
'sudo dhclient $IFACE.%(tag)d;')
class TrunkTest(base.BaseTempestTestCase):
@ -141,7 +139,6 @@ class TrunkTest(base.BaseTempestTestCase):
CONF.validation.image_ssh_user,
self.keypair['private_key'])
@utils.unstable_test("bug 1766701")
@decorators.idempotent_id('bb13fe28-f152-4000-8131-37890a40c79e')
def test_trunk_subport_lifecycle(self):
"""Test trunk creation and subport transition to ACTIVE status.
@ -222,7 +219,6 @@ class TrunkTest(base.BaseTempestTestCase):
CONF.validation.image_ssh_user,
self.keypair['private_key'])
@utils.unstable_test('bug 1766701')
@testtools.skipUnless(
CONF.neutron_plugin_options.image_is_advanced,
"Advanced image is required to run this test.")