[Return] ${updated_index_list}
Start_Single_Member
- [Arguments] ${member} ${wait_for_sync}=True ${timeout}=300s
+ [Arguments] ${member} ${wait_for_sync}=True ${timeout}=300s ${check_system_status}=False ${service_list}=@{EMPTY}
[Documentation] Convenience keyword that starts the specified member of the cluster.
${index_list} = ClusterManagement__Build_List ${member}
- Start_Members_From_List_Or_All ${index_list} ${wait_for_sync} ${timeout}
+ Start_Members_From_List_Or_All ${index_list} ${wait_for_sync} ${timeout} check_system_status=${check_system_status} service_list=@{service_list}
Start_Members_From_List_Or_All
[Arguments] ${member_index_list}=${EMPTY} ${wait_for_sync}=True ${timeout}=300s ${karaf_home}=${EMPTY} ${export_java_home}=${EMPTY} ${gc_log_dir}=${EMPTY}
+ ... ${check_system_status}=False ${service_list}=@{EMPTY}
[Documentation] If the list is empty, start all cluster members. Otherwise, start members based on present indices.
... If ${wait_for_sync}, wait for cluster sync on listed members.
... Optionally karaf_home can be overriden. Optionally specific JAVA_HOME is used for starting.
Run_Bash_Command_On_List_Or_All command=${command} ${gc_options} member_index_list=${member_index_list}
BuiltIn.Return_From_Keyword_If not ${wait_for_sync}
BuiltIn.Wait_Until_Keyword_Succeeds ${timeout} 10s Check_Cluster_Is_In_Sync member_index_list=${member_index_list}
- # TODO: Do we also want to check Shard Leaders here?
+ BuiltIn.Return_From_Keyword_If not ${check_system_status}
+ CompareStream.Run_Keyword_If_At_Least_Oxygen Wait Until Keyword Succeeds 60 2 ClusterManagement.Check Status of Services @{service_list}
[Teardown] Run_Bash_Command_On_List_Or_All command=netstat -pnatu | grep 2550
Freeze_Single_Member
${member_int} = BuiltIn.Convert_To_Integer ${member_index}
${member_ip} = Collections.Get_From_Dictionary dictionary=${ClusterManagement__index_to_ip_mapping} key=${member_int}
[Return] ${member_ip}
+
+Check Service Status
+ [Arguments] ${odl_ip} ${system_ready_state} ${service_state} @{service_list}
+ [Documentation] Issues the karaf shell command showSvcStatus to verify the ready and service states are the same as the arguments passed
+ ${service_status_output} = BuiltIn.Run Keyword If ${NUM_ODL_SYSTEM} > 1 KarafKeywords.Issue_Command_On_Karaf_Console showSvcStatus -n ${odl_ip} ${odl_ip} ${KARAF_SHELL_PORT}
+ ... ELSE KarafKeywords.Issue_Command_On_Karaf_Console showSvcStatus ${odl_ip} ${KARAF_SHELL_PORT}
+ BuiltIn.Should Contain ${service_status_output} ${system_ready_state}
+ : FOR ${service} IN @{service_list}
+ \ BuiltIn.Should Match Regexp ${service_status_output} ${service} +: ${service_state}
+
+Check Status of Services
+ [Arguments] @{service_list}
+ [Documentation] This keyword will verify whether all the services are operational in all the ODL nodes
+ : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
+ \ ClusterManagement.Check Service Status ${ODL_SYSTEM_${i+1}_IP} ACTIVE OPERATIONAL @{service_list}