From cfe6bba264c670bbe02dc92f03667b2e4b9b37a0 Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Tue, 19 Dec 2017 17:18:05 -0800 Subject: [PATCH] Fix bug in ip -> hypervisor retrieval the bug was being hit when the ip address of the compute node in question matched the substring of the ip address of another compute node in the hypervisor list output. example: 10.30.170.5 was matching on 10.30.170.5 -and- 10.30.170.56. This was probably not happening often, but it did happen here: https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/netvirt-csit-1node-openstack-ocata-upstream-stateful-carbon/245/log_full.html.gz#s1-s8-t7-k3-k3-k4 Change-Id: I89a8ae514db7b089ce337dcf6819a271f2b61562 Signed-off-by: Jamo Luhrsen --- csit/libraries/OpenStackOperations.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index 44732b3687..3f521cd950 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -291,7 +291,7 @@ Get Hypervisor Hostname From IP ... the full listing is logged first, then followed by a grep | cut to focus on the actual hostname to return ${rc} ${output} Run And Return Rc And Output openstack hypervisor list Log ${output} - ${rc} ${hostname}= Run And Return Rc And Output openstack hypervisor list -f value | grep ${hypervisor_ip} | cut -d" " -f 2 + ${rc} ${hostname}= Run And Return Rc And Output openstack hypervisor list -f value | grep "${hypervisor_ip} " | cut -d" " -f 2 Log ${hostname} Should Be True '${rc}' == '0' [Return] ${hostname} -- 2.36.6