Commit I7bb0f566eef9c4e5526272a2af567d0180db8e09 brought in a
change to logout from ssh connections, but in some cases the
connection is gone, such as during stop and start of ODL nodes
in clustering tests. This then fails the keyword and exits
so the later part of the keyword doesn't execute. And that is
the important part which opens a new connection. This ends up
leaving the old connection which is closed and unusable.
Change-Id: I3512686e7df117c453789608bc5c3b2121e7c7b8
Signed-off-by: Sam Hague <shague@redhat.com>
BuiltIn.Log ${member_index}
${status} ${old_connection_index} = BuiltIn.Run_Keyword_And_Ignore_Error Get From Dictionary ${connection_index_dict} ${member_index}
BuiltIn.Run_Keyword_If '${status}'=='PASS' BuiltIn.Run_Keywords SSHLibrary.Switch_Connection ${old_connection_index}
- ... AND SSHLibrary.Write logout
- ... AND SSHLibrary.Close_Connection
+ ... AND BuiltIn.Run_Keyword_And_Ignore_Error SSHLibrary.Write logout
+ ... AND BuiltIn.Run_Keyword_And_Ignore_Error SSHLibrary.Close_Connection
${odl_ip} = ClusterManagement.Resolve_IP_Address_For_Member ${member_index}
SSHLibrary.Open_Connection ${odl_ip} port=${KARAF_SHELL_PORT} prompt=${KARAF_PROMPT_LOGIN} timeout=${timeout}
${karaf_connection_object} = SSHLibrary.Get_Connection