Printer FriendlyEmail Article Link

How to troubleshoot the HLTAPI issue on Landslide?

Answer

How to find the Error in HLTAPI on Landslide:

Always get the logs from the customer as we have requested for all the cases.
 
How to enable the logs   
 
set logs "SET YOUR PATH WHERE YOU WANT TO DUMP THE LOGS"
set ret [::lsh::log_config \
        -log 1 \
      -logfile "$logs/ltapi_logfile" \
      -ls_log 1 \
       -ls_logfile "$logs/ls_logfile" \
       -lsh_log 1 \
       -lsh_logfile "$logs/lsh_logfile" \
       -lsh2lsmapping 1 \
       -lsh2lsmappingfile "$logs/lsh2lsmappingfile" ]
 
               This will dump four different logs files
1.       ls_logfile.txt  - This contains the sequence of Native API commands (same order of script execution)  LSTAPI, basically executes the Native tcl at the background and this provides how they executed. Also, helps to find if there anything  wrong the way attributes are passed
2.       lsh_logfile.txt – This is Sequence of LSTAPI command the same order as the script execution ( so you don’t need to have the customer Script you can execute this)
3.       lsh2lsmappingfile.txt   -  This maps the LSTAPI commands to LS Native Tcl commands.   Helps to understand the issue if you are familiar with Native API
4.        ltapi_logfile.txt – Contains the LSTAPI commands and the error messages.   This helps where is the Error and points where we need to debug.
 
 
For example:
Based on the customer “ltapi_logfile.txt” log this indicates
 
Network Devices - Control Node  [GgsnNodeCtlAddr] Starting IP address is outside the subnet range
Test case 'GGSN Node_from_lstapi' ts0tc0 requires user intervention} {} ----------- {Step 2:Activity, Init, is not allowed at this time because the test case is expected to be in state, RUNNING} Invalid-Not-Ready-To-Run-Or-Save
 
This complains about the STEP 2
 
Check the customer Script
 
puts "Trying automation now ... "
set autom1 [lsh::automation_config -test_hnd $test_handle_h -tc_activity Init -delay_or_loop 0]
puts "Step1"
set autom2 [lsh::automation_config -test_hnd $test_handle_h -tc_activity Start -delay_or_loop 0]
puts "Step2"
set autom3 [lsh::automation_config -test_hnd $test_handle_h -tc_activity Init -delay_or_loop 0 -predecessor_state RUNNING -predecessor_tc_handle $ggsn_tc_handle ]
 
The Order is different and causing the issue.  Use the command lsh::automation_config and search the document HLAPI Command Reference
 
Resolution:
set autom3 [lsh::automation_config -test_hnd $test_handle_h -tc_activity Init -delay_or_loop 0 -predecessor_tc_handle $ggsn_tc_handle -predecessor_state RUNNING  ]
 
This may help how to debug in other cases as well
 
So, please update the customer with above suggestion.

Product : Landslide,Tcl API