Hi everyone.
After upgrading to NetApp PowerShell Toolkit 4.0 (DataONTAP PowerShell Toolkit 3.3), I have been experiencing some strange behavior when using the cmdlet Add-NcQuota.
For example, when executing the command:
Add-NcQuota -path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM"
The following error message is displayed :
Add-NcQuota :Object reference not set to an instance of an object.
At line:1 character:1
+ Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverCon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (TJSS:NcController) [Add-NcQuota], NullReferenceException
+ FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.AddNcQuota
However, the quota is still applied correctly to the specified path.
I tried setting the attribute $global:CurrentNcController.TimeoutMsec to 600000 as suggested in this post, but the error persists.
We also executed Set-NaToolkitConfiguration "DEBUG" as another user suggested and this was the output (the error is localized to pt-BR):
PS D:\repository\powershell> Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM" -Verbose
2015-10-15 18:24:12,707 INFO DataONTAP.C.PowerShell.SDK.NcControllerCmdlet - Cmdlet invocation: Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverContext "SVM" -Verbose
MODO DETALHADO: Adding new tree quota.
2015-10-15 18:24:12,713 DEBUG NetApp.Ontapi.NaServer - <netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' vfiler='SVM'><quota-add-entry>
<disk-limit>204800</disk-limit>
<file-limit>-</file-limit>
<qtree />
<quota-target>/vol/CIFS_TESTE/teste_quota_2</quota-target>
<quota-type>tree</quota-type>
<soft-disk-limit>-</soft-disk-limit>
<soft-file-limit>-</soft-file-limit>
<threshold>-</threshold>
<volume>CIFS_TESTE</volume>
</quota-add-entry></netapp>
2015-10-15 18:24:12,852 DEBUG NetApp.Ontapi.NaServer - <results status="passed"/>
2015-10-15 18:24:12,853 DEBUG NetApp.Ontapi.NaServer - <netapp version='1.7' xmlns='http://www.netapp.com/filer/admin' v
filer='SVM'><quota-get-entry>
<qtree />
<quota-target>/vol/CIFS_TESTE/teste_quota_2</quota-target>
<quota-type>tree</quota-type>
<volume>CIFS_TESTE</volume>
</quota-get-entry></netapp>
2015-10-15 18:24:12,898 DEBUG NetApp.Ontapi.NaServer - <results status="passed"><disk-limit>204800</disk-limit><file-lim
it>-</file-limit><soft-disk-limit>-</soft-disk-limit><soft-file-limit>-</soft-file-limit><threshold>-</threshold></resul
ts>
Add-NcQuota : Referência de objeto não definida para uma instância de um objeto.
No linha:1 caractere:1
+ Add-NcQuota -Path '/vol/CIFS_TESTE/teste_quota_2' -DiskLimit "200MB" -VserverCon ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (TJSS:NcController) [Add-NcQuota], NullReferenceException
+ FullyQualifiedErrorId : QuotaGetEntryFailed,DataONTAP.C.PowerShell.SDK.Cmdlets.Quota.AddNcQuota
The same also occurs with the Set-NcQuota cmdlet.
I have seen someone suggest using the parameter -ErrorAction "SilentlyContinue", but that doesn't fix the problem, just "hides" it.
As for the environment:
Storage: Clustered DataONTAP 8.2.1 P1
PowerShell : 4.0
Workstation OS: Windows 7 Professional x64
Does anybody have any clues or additional tests to suggest?
Any help will be appreciated. Thanks in advance.