Skip to content

Fix bug in ST create, fix documentation for ST#1

Merged
rebecca-makar merged 1 commit intomasterfrom
st_bug
Jun 15, 2020
Merged

Fix bug in ST create, fix documentation for ST#1
rebecca-makar merged 1 commit intomasterfrom
st_bug

Conversation

@rebecca-makar
Copy link
Owner

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

@rebecca-makar rebecca-makar merged commit 4a984b9 into master Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants