Software Development Kit (SDK) and API Discussions

OnTAPI lun-get-iter fails with error 13001 on 8.3.1

pipatel
7,390 Views

When iterating through the LUNs using lun-get-iter() we are getting

 

Error 13001 during lun-get-iter() :
Parsing error in results: Start tag expect, '<' not found  

 

 

Looking at TCP dumps reveal that the XML is malformed

 

4f5                        <---------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE netapp SYSTEM 'file:/etc/netapp_gx.dtd'>
<netapp version='1.31' xmlns='http://www.netapp.com/filer/admin'>
<results status="passed">
  <attributes-list>
     <lun-info>
       <alignment>aligned</alignment>
       <block-size>512</block-size>
       <class>regular</class>
       <comment></comment>
       <creation-timestamp>1394119547</creation-timestamp>
       <is-clone>false</is-clone>
       <is-clone-autodelete-enabled>false</is-clone-autodelete-enabled>
       <is-inconsistent-import>false</is-inconsistent-import>
       <is-restore-inaccessible>false</is-restore-inaccessible>
       <is-space-alloc-enabled>false</is-space-alloc-enabled>
       <is-space-reservation-enabled>false</is-space-reservation-enabled>
       <mapped>true</mapped>
       <multiprotocol-type>vmware</multiprotocol-type>
       <node>ausstore6c</node>
       <online>true</online>
       <path>/vol/ausgc_data/vmdrfile001-data.lun</path>
       <prefix-size>0</prefix-size>
       <qtree></qtree>
       <read-only>false</read-only>
       <serial-7-mode></serial-7-mode>
       <serial-number>AvA1g?Dxdd2T</serial-number>
       <share-state>none</share-state>
       <size>1649392222208</size>
       <size-used>1631513231360</size-used>
       <staging>false</staging>
       <state>online</state>
       <suffix-size>0</suffix-size>
       <uuid>91d86f67-b8c4-4993-9a06-b6b1ed053128</uuid>
       <volume>ausgc_data</volume>
       <vserver>ausstore6_san</vserver>
      </lun-info>
41                   <---------------------------------------------------------------------
</attributes-list>
   <num-records>1</num-records>
 </results>
</netapp>
0                    <---------------------------------------------------------------------


This is happening on both sumulator and appliance. We've tested it several times and garbage appears at same place with same or different characters.
Has anyone seen this?

 

Thanks,

Piyush

5 REPLIES 5

DAN-1979
6,809 Views

Hi Leo,

 

Could you tell me how you switched this off using the NMSDK5.4P1 as in the commands?

 

Cheers

 

neha_T
5,141 Views

@pipatel have you get the resolution of this issue. 

i am also facing the same with python NMSDK

gaurav_verma
5,131 Views

Can you first try in ZEDI without any options. Python code like this is working for me. 

 

api = NaElement("lun-get-iter")

xo = s.invoke_elem(api)
if (xo.results_status() == "failed") :
print ("Error:\n")
print (xo.sprintf())
sys.exit (1)

print ("Received:\n")
print (xo.sprintf())

neha_T
5,107 Views

@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(selfserial_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">

Public