跳转到主内容

Python脚本运行系统CLI返回响应成功、但CLI未成功运行

Views:
57
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

适用场景

  • ONTAP 9
  • ONTAP REST API Python客户端库 (NetApp Python模块)

问题描述

  • Python脚本将返回以下系统命令行界面成功运行。

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 还显示了系统 命令行界面运行成功。

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 日志显示 已成功收到API:

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

  • 但是、在此期间不会引发相关EMS事件:

Tue Feb 25 17:53:05 +0000 [Node-01: svc_queue_thread: cf.setAutoGiveback:debug]: params: {'value': '0'}

  • 已成功修改  集群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.

  • 此系统命令行界面 成功运行前后的其他系统命令行界面以及EMS引发相关 事件。

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.