Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
Hi all,
I have been using the new version of PSTK 9.14.1 for a few days because I thought the previous bugs had been fixed.
But I will still have to use the switch "-ONTAPI" when connecting to the Netapp Cluster to get correct values.
Example:
CMDLET get-nccifsshare
Some wrong or no values are returned if the connection to the cluster is established without the ONTAPI switch and REST-API queries are used:
...profilename\documents> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Manifest 9.14.1.... Netapp.Ontap {Add-NaAggr, Add-NaCifsShare, Add-NaCredential, Add-NaFpolicyExtension...}
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PSReadlineKeyHandler, Set-PSReadlineKeyHandler...}
...profilename\documents> nc clustername -Credential $ncred
Name Address Vserver Version
---- ------- ------- -------
clustername 172.1.1.111 NetApp Release 9.12.1P10: Wed Dec 20 00:24:59 UTC 2023
...profilename\documents> $shares = Get-NcCifsShare -VserverContext vservername | select *
...profilename\documents> $shares | where {$_.sharename -like 'tmpshare$'}
Acl : {BUILTIN\Administrators / full_control, BUILTIN\Users / change, Everyone / full_control, ...}
AttributeCacheTtl :
CifsServer :
Comment :
DirUmask :
FileUmask :
ForceGroupForCreate :
MaxConnectionsPerShare :
NcController : clustername
OfflineFilesMode : manual
Path : /vol0815/q0815_11501
ShareName : tmpshare$
ShareProperties :
SymlinkProperties : {local}
Volume : vol0815
VscanFileopProfile : standard
Vserver : vservername
Name : tmpshare$
HomeDirectory : False
Oplocks : True
AccessBasedEnumeration : False
ChangeNotify : True
Encryption : False
NoStrictSecurity : False
AllowUnencryptedAccess : False
ShowSnapshot : False
ContinuouslyAvailable : False
NamespaceCaching : False
UnixSymlink : local
Browsable :
ShowPreviousVersion :
AttributeCache :
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : False
...profilename\documents> nc clustername -Credential $ncred -ONTAPI
Name Address Vserver Version
---- ------- ------- -------
clustername 172.1.1.111 NetApp Release 9.12.1P10: Wed Dec 20 00:24:59 UTC 2023
...profilename\documents> $shares = Get-NcCifsShare -VserverContext vservername | select *
...profilename\documents> $shares | where {$_.sharename -like 'tmpshare$'}
Acl : {BUILTIN\Administrators / Full Control, BUILTIN\Users / Change, Everyone / Full Control, ...}
AttributeCacheTtl :
CifsServer : cifsservername_missed_on_restapi
Comment :
DirUmask :
FileUmask :
ForceGroupForCreate :
MaxConnectionsPerShare : 4294967295_missed_on_restapi
NcController : clustername
OfflineFilesMode : manual
Path : /vol0815/q0815_11501
ShareName : tmpshare$
ShareProperties : {oplocks, browsable, changenotify, show_previous_versions}_missed_on_restapi
SymlinkProperties : {symlinks}_wrong_on_restapi
Volume : vol0815
VscanFileopProfile : no_scan_wrong_on_restapi
Vserver : vservername
Name : tmpshare$
HomeDirectory : False
Oplocks : False_wrong_on_restapi
AccessBasedEnumeration : False
ChangeNotify : False_wrong_on_restapi
Encryption : False
NoStrictSecurity : False
AllowUnencryptedAccess : False
ShowSnapshot : False
ContinuouslyAvailable : False
NamespaceCaching : False
UnixSymlink : _wrong_on_restapi
Browsable :
ShowPreviousVersion :
AttributeCache :
AttributeCacheTtlSpecified : False
DirUmaskSpecified : False
FileUmaskSpecified : False
MaxConnectionsPerShareSpecified : True_wrong_on_restapi
...profilename\documents>
In Addition I checked the return values of a direct REST-API call with System Mananger:
Here the important value of vscan_profile is correctly "no_scan" other than "standard". It means, the cluster is delivering the correct values to the REST-API call:
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
},
"vscan_profile": "no_scan"
}
Kind regards
Holger
Solved! See The Solution
Hello Holger,
Please send us the debug logs using Set-NatoolkitConfiguration debug command it will help us to understand the problem. Kindly drop a mail on ng-ontap-pstk-queries
Hi,
Can you please provide us the debug logs of the same, this will help us to understand the issue more efficiently.
You can enable the debug logs using Set-NatoolkitConfiguration debug command.
I'll try this. But I do not publish it here. Can I open a technical case for that?
I tried this.
Here is some output without confidential data (CLI-command with % char to blank names):
It's strange that NetApp.Ontapi.OntapiUtils is mentioned here.
Kind regards,
Holger
Please drop a mail on ng-ontap-pstk-queries
Hello Holger,
Please send us the debug logs using Set-NatoolkitConfiguration debug command it will help us to understand the problem. Kindly drop a mail on ng-ontap-pstk-queries
Hello @saharsh
Can you please explain why, since this is a "community", that this "accepted solution" was taken offline and not shown here??
I'm using PSTK 9.15, and clearly, this stuff is STILL broken. Trying to run Add-NcCifsShare with the parameters that are clearly defined in 'get-help' as " This parameter is supported with Rest only", and NONE of them are set, and they fail SILENTLY. I found another thread here that was years-old where the OP described essentially the same thing when running PSTK 9.12, and the solution was to downgrade PSTK. That's not a solution. Or is the doco for this kit what's broken, in that it tells users to do things that are clearly broken. When I attempted first to use the -ShareProperties parameter, I received the error "Add-NcCifsShare: ShareProperties parameter specified, which is not supported for REST call". Ok, then I'll use the parameters defined in 'get-help' as "This parameter is supported with Rest only". They all fail miserably, and silently. -Oplocks, -ChangeNotify, -ShowSnapshot. Every one is a big, fat NOPE. I then tried to use Connect-NcController with the -ApplicationName to ONTAPI or HTTPS to try the -ShareProperties parameter, yet still receive the RestApi error. What gives?
I need more information about what's going on behind the scenes. Could you please share the debug logs for both ZAPI and REST using the Set-NatoolkitConfiguration debug command? This will help me identify the root cause of the error. Please send mail over ng-ontap-pstk-queries