Fix bug in ip -> hypervisor retrieval 72/66672/2
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 20 Dec 2017 01:18:05 +0000 (17:18 -0800)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 20 Dec 2017 21:00:24 +0000 (21:00 +0000)
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 <jluhrsen@redhat.com>
csit/libraries/OpenStackOperations.robot

index 44732b36871ead8cbc2cfd927f63241c5894a4aa..3f521cd9504434a043d265e5dc37d7b2c4f6b1f6 100644 (file)
@@ -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}