Software Development Kit (SDK) and API Discussions

NMSDK 9.4: net-cluster-ping issue

Ramesh_S
2,018 Views

This issue is related to NMSDK while running api “net-cluster-ping”, it is giving false result even when LIF is down ping result shows passed but actual CLI command run from the cluster fails.

 

NMSDK : 9.4

Ontap: 9.1P5

 

API:

==========================================================================================

 

import sys
sys.path.append("<path_to_nmsdk_root>/lib/python/NetApp")
from NaServer import *


s = NaServer("<cluster>", 1 , 110)
s.set_server_type("FILER")
s.set_transport_type("HTTPS")
s.set_port(443)
s.set_style("LOGIN")
s.set_admin_user("admin", "<password>")

 

# Ping an IP address to verify whether the interface is alive
api = NaElement("net-cluster-ping")

# Specifies IPv4 address of the destination.
api.child_add_string("destination-address","<ip>")

# Specifies the LIF from which the ping request is to be sent. This element must be specified with interface-owner, and it is mutually exclusive with element node.
api.child_add_string("interface","<test_lif>")

# Specifies the name of the owning vserver of the logical interface (LIF).
api.child_add_string("interface-owner","<test_vserver>")

# Specifies the number of ECHO_REQUEST retries for the given destination address. Ping stops upon first successful reply from the destination. Default: 20
api.child_add_string("retry-count","5")

# Specifies inter packet time interval (secs) for sending ECHO_REQUEST. Default: 1
api.child_add_string("wait","3")

# Specifies the maximum number of milliseconds to wait for each ping response. Default: 10000 (10 secs)
api.child_add_string("wait-response","3")

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())

 

***********************************************************************************

 

RESULTS:

 

<?xml version='1.0' encoding='UTF-8' ?>
<netapp version='1.110' xmlns='http://www.netapp.com/filer/admin'>

<!-- Output of net-cluster-ping [Execution Time: 1491 ms] -->
<results status='passed'/>
</netapp>

 

***********************************************************************************

 

Whereas in Ontap CLI,

 

CLI:

==========================================================================================

rtp1-c01-nas::> net ping -vserver <test_vserver> -lif <test_lif> -destination <ip>

  (network ping)

<ip> is alive

 

rtp1-c01-nas::> network int modify -vserver <test_vserver> -lif <test_lif> -status-admin down

 

rtp1-c01-nas::> net int show -vserver <test_vserver> -lif <test_lif>

  (network interface show)

 

                    Vserver Name: <test_vserver>

          Logical Interface Name: <test_lif>

                            Role: data

                   Data Protocol: nfs, cifs, fcache

                       Home Node: <node_name>

                       Home Port: <port_name>

                    Current Node: <node_name>

                    Current Port: <port_name>

              Operational Status: down

                 Extended Status: -

                         Is Home: true

                 Network Address: xx.xx.xx.xx

                         Netmask: xx.xx.xx.xx

             Bits in the Netmask: xx

                     Subnet Name: -

           Administrative Status: down

                 Failover Policy: system-defined

                 Firewall Policy: data

                     Auto Revert: false

   Fully Qualified DNS Zone Name: none

         DNS Query Listen Enable: false

             Failover Group Name: <failovergroup_name>

                        FCP WWPN: -

                  Address family: ipv4

                         Comment: -

                  IPspace of LIF: Default

  Is Dynamic DNS Update Enabled?: true

 

rtp1-c01-nas::> net ping -vserver <test_vserver> -lif <test_lif> -destination <ip>

  (network ping)

ping encountered an error : ping: bind: Can't assign requested address : Check the configuration and connectivity of your network interfaces and routes.

 

rtp1-c01-nas::> net ping -vserver <test_vserver> -lif <test_lif> -destination <ip>

  (network ping)

ping encountered an error : ping: bind: Can't assign requested address : Check the configuration and connectivity of your network interfaces and routes.

 

 

Would appreciate your valuable insights & assistance. Thank you!

 

Thanks

Ramesh S

+91 9880211335

 

0 REPLIES 0
Public