Python script runs system cli return response as success but the cli didn't run successfully
Applies to
- ONTAP 9
- ONTAP REST API Python client library (NetApp Python Module)
Issue
- Python script returns the following system cli runs successfully.
2024-02-27 16:06:52,529 /opt/python-netapp/./volume_move_unjoin.py:274 INFO: Disabling auto_giveback
Set auto-giveback, hwassist, and auto-giveback-after-panic to false
2024-02-27 16:06:52,941 /opt/python-netapp/./volume_move_unjoin.py:378 DEBUG: -----------------
2024-02-27 16:06:53,357 /opt/python-netapp/./volume_move_unjoin.py:379 DEBUG: Request to NetApp
2024-02-27 16:06:53,781 /opt/python-netapp/./volume_move_unjoin.py:380 DEBUG: -----------------
<system-cli>
<args>
<arg>storage</arg>
<arg>failover</arg>
<arg>modify</arg>
<arg>-node</arg>
<arg>*</arg>
<arg>-auto-giveback</arg>
<arg>false</arg>
<arg>-hwassist</arg>
<arg>false</arg>
<arg>-auto-giveback-after-panic</arg>
<arg>false</arg>
</args>
</system-cli>
2024-02-27 16:06:54,251 /opt/python-netapp/./volume_move_unjoin.py:389 DEBUG: --------------------
2024-02-27 16:06:54,657 /opt/python-netapp/./volume_move_unjoin.py:390 DEBUG: Response from NetApp
2024-02-27 16:06:55,074 /opt/python-netapp/./volume_move_unjoin.py:391 DEBUG: --------------------
<results status="passed">
<cli-output></cli-output>
<cli-result-value>0</cli-result-value>
</results>
2024-02-27 16:06:55,483 /opt/python-netapp/./volume_move_unjoin.py:1891 INFO: ===== system_cli(command: storage failover modify -node * -auto-giveback
false -hwassist false -auto-giveback-after-panic false) =====
2024-02-27 16:06:55,913 /opt/python-netapp/./volume_move_unjoin.py:1910 INFO: None
Done
2024-02-27 16:06:56,321 /opt/python-netapp/./volume_move_unjoin.py:277 INFO: Completed: Disabling auto_giveback
AUDIT-MLOG-TXT.GZ
also shows system cli run successfully.
Tue Feb 27 2024 16:06:54 +00:00 [kern_audit:info:2000]Vserver:ontapi :: Host-IP:55330 :: Vserver:api :: <netapp version="1.31" xmlns="http://www.netapp.com/filer/admin" nmsdk_version="9.8P6" nmsdk_platform="" nmsdk_language="Python"><system-cli><args><arg>storage</arg><arg>failover</arg><arg>modify</arg><arg>-node</arg><arg>*</arg><arg>-auto-giveback</arg><arg>false</arg><arg>-hwassist</arg><arg>false</arg><arg>-auto-giveback-after-panic</arg><arg>false</arg></args></system-cli></netapp> :: Pending:
Tue Feb 27 2024 16:06:54 +00:00 [kern_audit:info:2000]Vserver:ontapi :: Host-IP:55330 :: Vserver:api :: system-cli :: Success:
APACHE-ACCESS
log shows received the API successfully:
Host-IP pii_encrypt/pJLKxrQRL8V8sHH6uczbyblP2YoL+VzVygFMqbQIXQ0=/pii_encrypt 4294967295 api [Tue Feb 25 17:40:41.047101 2025 +0000] "POST /servlets/netapp.servlets.admin.XMLrequest_filer HTTP/1.1" 200 265 6741 - 0 + 127.0.0.1 system-cli
- However, no related EMS event raise during this period:
Tue Feb 25 17:53:05 +0000 [Node-01: svc_queue_thread: cf.setAutoGiveback:debug]: params: {'value': '0'}
- Successfully modified the options from cluster shell.
Tue Feb 25 2025 17:53:05 +00:00 [kern_audit:info:1981]Vserver:console :: console :: Vserver:cs_admin :: storage failover modify -node * -auto-giveback false -hwassist false -auto-giveback-after-panic false :: Pending
Tue Feb 25 2025 17:53:05 +00:00 [kern_audit:info:1981]Vserver:console :: console :: Vserver:cs_admin :: storage failover modify -node * -auto-giveback false -hwassist false -auto-giveback-after-panic false :: Success: 2 entries were modified.
- Other system cli before and after this system cli runs successfully and EMS raised relevant event.