Software Development Kit (SDK) and API Discussions

ZAPI is not enabled in pre-cluster mode

ronaldmajor
7,686 Views

I am scripting the tasks to build a new filer with PSTK 4.4 and it is failing at the first step. I am testing on a 9.1 simulator.

I manually set the node management IP and execute Connect-NcController then get the following result.

 

PS C:\Scripts> Connect-NaController 192.168.146.21 -HTTPS
Connect-NaController : ZAPI is not enabled in pre-cluster mode.
At line:1 char:1
+ Connect-NaController 192.168.146.21 -HTTPS
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidResult: (192.168.146.21:NaController) [Connect-NaController], EAPIPRIVILEGE
    + FullyQualifiedErrorId : HttpConnectionFailed,DataONTAP.PowerShell.SDK.ConnectNaController

 

What am I missing?

 

9 REPLIES 9

asulliva
7,667 Views

Hello @ronaldmajor,

 

Have you seen this post by @JohnChampionAutomate Cluster Setup in 12-Steps with ONTAP PowerShell Toolkit 4.1?

 

He walks through the process of setting up a cluster using the PowerShell Toolkit.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

ronaldmajor
7,624 Views

Thank you.  I did see that post and am using those techniques. Looking back at the prerequisites, step 2 may be the part that I need to work on.

 

In the simulator, I "Clean configuration and initialize all disks."  After the clean and filer reboots it asks for the node network information. I enter the IP information and then it it says to use a browser to complete the setup. At this point I, use Ctrl-C to break out of the setup and set the admin password. I then use the Connect-NcController with the node IP and provide the admin user and password to log in. This is where I get the error.

 

Could this be specific to the simulator. I have a FAS2520 to test with, but do not have it ready to use at this time.

I was hoping to test with the simulator before tackling the real thing.

 

ronaldmajor
7,605 Views

OK, I found that if I break out of the cluster setup after boot, set the admin password, and manually create the node management lif, then Connect-NcController works.

 

It looks like  a level of manual effort must be accomplished before automation can be used.

 

JohnChampion
7,600 Views

Glad you got it working!

 

Interesting though - I just tried it with the 9.1 Simulator and it connected (without manually creating a LIF) - just ran node setup, Ctrl-C, then set the password.

 

You might want to verify all your network mappings (vmnic->virtual netowrk->ONTAP port e0?).  I set all 4 of mine to "Host-Only" which is vmnet1. If I recall, the default uses NAT on a couple vmnics..

 

Did you verify you could ping the IP address you assigned in node setup before creating the LIF?

 

Also, there are a limited number of ZAPI commands that work before the cluster is created...I haven't checked this lately but seems to still be correct 😉

 

Allowed Precluster ZAPI calls:

 

  • net-interface-create
  • net-interface-modify
  • net-interface-delete
  • net-port-modify
  • net-device-discovery-get-iter
  • net-port-get-iter
  • net-interface-get-iter
  • storage-disk-get-iter
  • aggr-spare-get-iter
  • cf-status
  • system-get-node-info-iter
  • net-options-get
  • net-options-modify
  • net-cluster-ping
  • security-login-modify-password
  • system-node-discovery-get-iter

 So if a PowerShell cmdlet uses any ZAPI calls not listed above BEFORE the cluster is created - you will get the "ZAPI is not enabled in pre-cluster mode" error.

 

ronaldmajor
7,587 Views

Thanks for the reply.

 

Interesting though - I just tried it with the 9.1 Simulator and it connected (without manually creating a LIF) - just ran node setup, Ctrl-C, then set the password.

 

You might want to verify all your network mappings (vmnic->virtual netowrk->ONTAP port e0?).  I set all 4 of mine to "Host-Only" which is vmnet1. If I recall, the default uses NAT on a couple vmnics..

The first two vmnics (e0a and e0b) are for cluster interconnects and do not need host access.

 

Did you verify you could ping the IP address you assigned in node setup before creating the LIF?

Yes, I can ping the the node address and access with a browser.  I do not know what the difference is between the LIF created by node setup or manual. I'll have to look deeper.

 

Also, there are a limited number of ZAPI commands that work before the cluster is created...I haven't checked this lately but seems to still be correct Smiley Wink

 

Allowed Precluster ZAPI calls:

 

  • net-interface-create
  • net-interface-modify
  • net-interface-delete
  • net-port-modify
  • net-device-discovery-get-iter
  • net-port-get-iter
  • net-interface-get-iter
  • storage-disk-get-iter
  • aggr-spare-get-iter
  • cf-status
  • system-get-node-info-iter
  • net-options-get
  • net-options-modify
  • net-cluster-ping
  • security-login-modify-password
  • system-node-discovery-get-iter

 So if a PowerShell cmdlet uses any ZAPI calls not listed above BEFORE the cluster is created - you will get the "ZAPI is not enabled in pre-cluster mode" error.

This is good stuff. It looks like some additional setup may be required before I can create the cluster since New-NcCluster does not work. That's another question.

 

 

JohnChampion
7,578 Views

I'm doing some tests using the 9.1 and 9.2 simulators.  

 

Looks like if you're building a single node cluster, the 2 ports assigned to the Cluster ipspace need to be moved to the Default ipspace

 

I got it to work on 9.2 sim - but I corrupted my root volume on the 9.1 sim 😉

 

I also used the -NodeCount 1 parameter on the New-NcCluster cmdlet.

 

Will update once I get through a few runs.

 

 

 

 

JohnChampion
7,572 Views

OK - I'm assuming you're building a single node cluster with the 9.1 simulator

 

 

I ran node setup and set the admin password

 

Then I moved e0a and e0b out of the Cluster ipspace and placed them in the Default ipspace

 

     net port modify -node localhost -port e0a -ipsapce Default

     net port modify -node localhost -port e0b -ipsapce Default

 

Rebooted (may not be necessary but I wanted to make sure the changes stuck)

 

PS> Import-Module DataONTAP

 

PS> Connect-NcController {node IP}

 

PS> New-NcCluster -ClusterName TEST -License {whatever} -NodeCount 1

 

PS> Get-NcClusterCreateProgress


CurrentStatusMessage : Cluster has been created.
IsComplete : True
NcController : 192.168.201.11
Status : success
IsCompleteSpecified : True

 

TEST::> cluster show

 

Node                               Health            Eligibility

-------------------------------  ------------------  ------------

TEST-01                         true                  true

 

 

I have a 2-node 9.1 simulator that I can zero and try as well - I'm curious 😉

 

 

ronaldmajor
7,436 Views

When I moved the cluster ports to the Default IPspace New-NcCluster worked.

 

I tried to use Set-NcNetPort to change the cluster port IPspace but it fails.

 

PS C:\windows\system32> Set-NcNetPort -Node localhost -Name e0b -Ipspace Default
Set-NcNetPort : You must provide one or more values to apply your changes.
At line:1 char:1
+ Set-NcNetPort -Node localhost -Name e0b -Ipspace Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (192.168.146.21:NcController) [Set-NcNetPort], EINVALIDINPUTERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.C.PowerShell.SDK.Cmdlets.Net.SetNcNetPort

 

 

I don't know if this is not supported in ONTAP 9.1 or if I am missing an argument. I am using PSTK 4.4.

 

mirko
3,425 Views

I know it's an old thread, but just for other to follow.  I have managed to setup a simulator with zero human interaction, using the vmware api Vmware.vim.usbScanCodeSpec.  this allows you to interact with a vm through a vcenter connection.  I used this to interupt boot, using option 4, setup cluster.  The rest can then be done ansible or code of preference.

Public