Skip to content

Conversation

@rebecca-makar
Copy link
Member

Description

Without Flag:

PS C:\Users\remakar\azure-powershell-pr\artifacts\Debug\Az.HPCCache> New-AzHpcCacheStorageTarget -ResourceGroupName test_rg -CacheName test_cmdlet_cache -Name test_cmdlet_st  -StorageContainerID "<ID>" -Junction @(@{"namespacePath"="/cache/storage/targets/test_cmdlet_st";"targetPath"="/"})

Confirm
Are you sure you want to create HPC cache storage target 'test_cmdlet_st'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
New-AzHpcCacheStorageTarget : Need CLFS or NFS flag.
At line:1 char:1
+ New-AzHpcCacheStorageTarget -ResourceGroupName test_rg -CacheNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [New-AzHpcCacheStorageTarget], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.HPCCache.NewAzHpcStorageTarget

With Wrong flag (NFS FLAG ON CLFS ST):

PS C:\Users\remakar\azure-powershell-pr\artifacts\Debug\Az.HPCCache> New-AzHpcCacheStorageTarget -ResourceGroupName test_rg -NFS -CacheName test_cmdlet_cache -Name test_cmdlet_st  -StorageContainerID "<ID>" -Junction @(@{"namespacePath"="/cache/storage/targets/test_cmdlet_st";"targetPath"="/"})
New-AzHpcCacheStorageTarget : Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.
At line:1 char:1
+ New-AzHpcCacheStorageTarget -ResourceGroupName test_rg -NFS -Cac ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [New-AzHpcCacheStorageTarget], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Azure.Commands.HPCCache.NewAzHpcStorageTarget

With correct (-CLFS):

PS C:\Users\remakar\azure-powershell-pr\artifacts\Debug\Az.HPCCache> New-AzHpcCacheStorageTarget -ResourceGroupName test_rg -CacheName test_cmdlet_cache -Name test_cmdlet_st123 -CLFS -StorageContainerID "<ID>" -Junction @(@{"namespacePath"="/cache";"targetPath"="/"})

Confirm
Are you sure you want to create HPC cache storage target 'test_cmdlet_st123'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

Name              : test_cmdlet_st123
Id                : <ID>
TargetType        : clfs
ProvisioningState : Creating
Junctions         : {Microsoft.Azure.PowerShell.Cmdlets.HPCCache.Models.PSNamespaceJunction}
Nfs3              :
Clfs              : Microsoft.Azure.PowerShell.Cmdlets.HPCCache.Models.PSHpcClfsTarget

In new-azhpccachestoragetarget it was throwing the wrong exception if the storage target already exists, it was throwing upgradeCache instead of storageTargetAlreadyExists.

Fix examples in help files. -Junction instead of -Junctions

Confirm
Are you sure you want to create HPC cache storage target 'test_cmdlet_st'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
New-AzHpcCacheStorageTarget : The storage target 'test_cmdlet_st' already exists for HPC cache 'test_cmdlet_st'.
At line:1 char:1
+ New-AzHpcCacheStorageTarget -ResourceGroupName test_rg -CacheNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : CloseError: (:) [New-AzHpcCacheStorageTarget], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.HPCCache.NewAzHpcStorageTarget

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • [X ] The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@VeryEarly VeryEarly self-assigned this Jun 16, 2020
@VeryEarly VeryEarly merged commit c4513e1 into Azure:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants