ONTAP Rest API Discussions

powershell toolkit 9.13 1.2306 get-NcQuota is not working correctly for all volumes

silvassy
466 Views

hello all, while trying to do some data collection I stumbled into get-NcQuota not working.

Researching here I found a few ways to use the old zapi style call which works fine, but for ongoing what might be the issue with the REST Api call that is breaking?  and will it be fixed?

 

I have anonymized the details, but I have many volumes where the rest type call that will ether show 0-3 replies then give  the error below.  I have a select few volumes where the output is as expected for REST (which is not good, but at least something)

"Get-NcQuota: The input string '-' was not in a correct format."

 

 

 

details:  cli output, then powershell with REST, then powershell with zapi


Cluster CLI output
cluster::> quota policy rule show -vserver cluster_pub -volume example1

Vserver: cluster_pub Policy: default Volume: example1

Soft Soft
User Disk Disk Files Files
Type Target Qtree Mapping Limit Limit Limit Limit Threshold
----- -------- ------- ------- -------- ------- ------ ------- ---------
tree ex1_tree1 "" - 6GB 5GB - - -
tree ex1_tree2 "" - 6GB 5GB - - -
tree ex1_tree3 "" - 22GB 20GB - - -
tree ex1_tree4 "" - 355GB 350GB - - -
tree ex1_tree5 "" - 10GB 9.90GB - - -
5 entries were displayed.

cluster::> quota policy rule show -vserver cluster_pub -volume example2

Vserver: cluster_pub Policy: default Volume: example2

Soft Soft
User Disk Disk Files Files
Type Target Qtree Mapping Limit Limit Limit Limit Threshold
----- -------- ------- ------- -------- ------- ------ ------- ---------
tree ex2_tree1 "" - 56.51GB 51.38GB - - -
tree ex2_tree2 "" - 100GB - - - -
tree ex2_tree3 "" - 150GB - - - -
tree ex2_tree4 "" - 205GB 200GB - - -
tree ex2_tree4 "" - 30GB 25GB - - -
5 entries were displayed.

 

 


powershell toolkit using rest

PS C:\powershell_out> get-ncquota -vserver 'cluster_pub' -volume example1

QuotaType QuotaTarget Volume Qtree DiskLimit FileLimit Vserver
--------- ----------- ------ ----- --------- --------- -------
tree example1 ex1_tree1 6291456 cluster…
tree example1 ex1_tree2 6291456 cluster…
tree example1 ex1_tree3 23068672 cluster…
tree example1 ex1_tree4 372244480 cluster…
tree example1 ex1_tree5 10485760 cluster…

PS C:\powershell_out> get-ncquota -vserver 'cluster_pub' -volume example2

QuotaType QuotaTarget Volume Qtree DiskLimit FileLimit Vserver
--------- ----------- ------ ----- --------- --------- -------
tree example2 ex2_tree1 59260307 cluster…
Get-NcQuota: The input string '-' was not in a correct format.

 


powershell toolkit using zapi

PS C:powershell_out> get-ncquota -vserver 'cluster_pub' -volume example1 -zapicall

QuotaType QuotaTarget Volume Qtree DiskLimit FileLimit Vserver
--------- ----------- ------ ----- --------- --------- -------
tree /vol/example1/ex1_tree1 example1 6291456 - cluster…
tree /vol/example1/ex1_tree2 example1 6291456 - cluster…
tree /vol/example1/ex1_tree3 example1 23068672 - cluster…
tree /vol/example1/ex1_tree4 example1 372244480 - cluster…
tree /vol/example1/ex1_tree5 example1 10485760 - cluster…


PS C:powershell_out> get-ncquota -vserver 'cluster_pub' -volume example2 -zapicall

QuotaType QuotaTarget Volume Qtree DiskLimit FileLimit Vserver
--------- ----------- ------ ----- --------- --------- -------
tree /vol/example2/ex2_tree1 example2 59260307 - cluster…
tree /vol/example2/ex2_tree2 example2 104857600 - cluster…
tree /vol/example2/ex2_tree3 example2 157286400 - cluster…
tree /vol/example2/ex2_tree4 example2 214958080 - cluster…
tree /vol/example2/ex2_tree4 example2 31457280 - cluster…

 

 

 

 

4 REPLIES 4

silvassy
426 Views

I did some testing using just RESTapi calls via swaggerUI and for the same volume that works there, but the toolkit using REST fails.

 

what is the path to get this corrected?

saharsh
302 Views
Hi Silvassy, Could you please share the debug logs for both ZAPI and REST using the 'Set-Natoolkitconfiguration debug' command? Providing this information will help us gain a deeper insight into the problem. -Saharsh

saharsh
227 Views

Hi silvassy, We are able to identify the issue, we will address and resolve this in the upcoming 9.15.1 PSTK release. Thanks, Saharsh

silvassy
91 Views

Is there any public bug tracker for these issues?

I am running into many issues with the rest based calls and it would be good to know if they are known bugs or not.

 

Also it does not seem like the rest calls are  fully equivalent for everyday use yet.  and are even slower than the zapi based calls.

Public