Hi,
I have a python script that would run for hours and then I would get an Zapi Exception error when I am trying to do a server_ct_invoke_elem. The stack trace is as follows:
Traceback (most recent call last):
File "ontapmon.py", line 328, in aggrperf_get
perf_out = server_ctx.invoke_elem(perf_in)
File "/mnt/lsf/netapp-manageability-sdk-5.0//lib/python/NetApp/NaServer.py", line 490, in invoke_elem
return self.parse_xml(xml_response)
File "/mnt/lsf/netapp-manageability-sdk-5.0//lib/python/NetApp/NaServer.py", line 686, in parse_xml
p.Parse(xmlresponse, 1)
File "/mnt/lsf/netapp-manageability-sdk-5.0//lib/python/NetApp/NaServer.py", line 666, in end_element
self.ZAPI_stack[i-1].child_add(n)
IndexError: list index out of range
Basically the script would collect counters via DFM:
# Create API request
perf_in = NaElement("perf-get-counter-data")
perf_in.child_add_string("number-samples", 1)
instance_info = NaElement("instance-counter-info")
counter_info = NaElement("counter-info")
instance_info.child_add_string("object-name-or-id", obj_name)
perf_obj_ctr1 = NaElement("perf-object-counter")
perf_obj_ctr1.child_add_string("object-type", "volume")
perf_obj_ctr1.child_add_string("counter-name", "avg_latency")
perf_obj_ctr2 = NaElement("perf-object-counter")
perf_obj_ctr2.child_add_string("object-type", "disk")
perf_obj_ctr2.child_add_string("counter-name", "disk_busy")
counter_info.child_add(perf_obj_ctr1)
counter_info.child_add(perf_obj_ctr2)
instance_info.child_add(counter_info)
perf_in.child_add(instance_info)
try:
perf_out = server_ctx.invoke_elem(perf_in)
Has anyone gotten this error before? If so, any insight on a solution? I am using DFM version 5.1 and version NMSDK 5.0 . Attached is the python script (ontapmon.py), the config file (parameter settings that defines DFM server, password, etc) to pass to the python script and example log message when I get the error.
Please advise.
Regards,
ajacob