@gaurav_verma i tried the same.
i have written a function which get the lun info for specified "serial-number".
it is working fine, but when i tried to fetch multiple lun-info in multi-threaded environment. some threads are successful to fetch info. while some fail with the error i mention:
i have specified the on-tap version also: server = NaServer(ip, 1 , 32)
<snip>
def get_lun_by_serial_no(self, serial_no😞
try:
api = NaElement("lun-get-iter")
xi = NaElement("desired-attributes")
api.child_add(xi)
xi1 = NaElement("lun-info")
xi.child_add(xi1)
xi1.child_add_string("path","<path>")
xi1.child_add_string("serial-number","<serial-number>")
xi1.child_add_string("volume","<volume>")
xi1.child_add_string("size","<size>")
xi1.child_add_string("vserver","<vserver>")
xi1.child_add_string("uuid","<uuid>")
xi2 = NaElement("query")
api.child_add(xi2)
xi3 = NaElement("lun-info")
xi2.child_add(xi3)
xi3.child_add_string("serial-number",serial_no)
xo = self.serverobj.invoke_elem(api)
xmldata = xo.sprintf()
data = self.get_xml_to_dict_data(xmldata)
if (xo.results_status() == "failed") :
message = self.client_conn.format_exception(data)
raise Exception(message)
if data.get('num-records') != '0':
return data["attributes-list"]["lun-info"]
return []
except Exception as e:
message = "lib Fail to get luns: " + e
raise Exception(message)
<snip>
Error:
results status="failed" reason="Zapi::parse_xml - Expected <netapp> element but got volume-error" errno="13001">