PureStorage-Connect / PowerShellSDK2

Pure Storage FlashArray PowerShell Software Development Kit (SDK) version 2.
https://support.purestorage.com/Solutions/Microsoft_Platform_Guide
Apache License 2.0
8 stars 7 forks source link

The pipeline has been stopped. #7

Closed ghost closed 1 year ago

ghost commented 2 years ago
Get-Pfa2Volume | Select-Object -First 1

Returns first X amount of volumes and then throws the exception.

PSMessageDetails      :
Exception             : System.Management.Automation.PipelineStoppedException: The pipeline has been stopped.
                           at System.Management.Automation.CommandProcessor.ProcessRecord()
                           at System.Management.Automation.CommandProcessorBase.DoExecute()
                           at System.Management.Automation.Cmdlet.WriteObject(Object sendToPipeline)
                           at PureStorage.Rest.PowerShell.CmdletUtils.ProcessApiResponse[T](PSCmdlet cmdlet, Rest2Api array, Nullable`1 Limit, Func`3 getReponseUsingToken)
                           at PureStorage.Rest.PowerShell.GetVolumeCmdlet.EndProcessing()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Get-Pfa2Volume], PipelineStoppedException
FullyQualifiedErrorId : PureStorage.Rest.PowerShell.GetVolumeCmdlet
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {0, 1, 1}
ghost commented 2 years ago

This also happens silently on Get-Pfa2VolumeSpace unless -First X is greater than or equal to the number of volumes.

C:\> Get-Pfa2VolumeSpace | Select-Object -First 10

C:\>

C:\> Get-Pfa2VolumeSpace | Select-Object -First 11
Id                                   Name                                           Space
--                                   ----                                           -----
8e663719-2a75-40c0-ae98-bab317fe3146 vvol-server01-aaaaaaaa-vg/Config-bbbbbbbb      class Space {...
+ 10 more
C:\>

C:\> Get-Pfa2VolumeSpace | Select-Object -First 10
Get-Pfa2VolumeSpace: The pipeline has been stopped.

C:\>
PSMessageDetails      :
Exception             : System.Management.Automation.PipelineStoppedException: The pipeline has been stopped.
                           at System.Management.Automation.CommandProcessor.ProcessRecord()
                           at System.Management.Automation.CommandProcessorBase.DoExecute()
                           at System.Management.Automation.Cmdlet.WriteObject(Object sendToPipeline)
                           at PureStorage.Rest.PowerShell.CmdletUtils.ProcessApiResponse[T](PSCmdlet cmdlet, Rest2Api array, Nullable`1 Limit, Func`3 getReponseUsingToken)
                           at PureStorage.Rest.PowerShell.GetVolumeSpaceCmdlet.EndProcessing()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Get-Pfa2VolumeSpace], PipelineStoppedException
FullyQualifiedErrorId : PureStorage.Rest.PowerShell.GetVolumeSpaceCmdlet
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {0, 1, 11}
barkz commented 2 years ago

Thanks @saidbrandon we will track these JIRAs for SDK vNext.

Cheers -- Barkz

barkz commented 2 years ago

@saidbrandon what version of Purity are you testing against and the FlashArray model?

Cheers -- Barkz

ghost commented 2 years ago

M70 on 6.1.7

hfanan commented 1 year ago

Fixed in PureStoragePowerShellSDK2 2.24.70