rubrikinc/rubrik-sdk-for-powershell

Get-RubrikDatabaseDownloadLink never finish on PowerShell 5.1

patrikdahlsll opened this issue · 1 comments

Current Behavior:
Get-RubrikDatabaseDownloadLink run on PowerShell 5.1 supplied with Windows 10 results in a never ending "Waiting for download link to be available on Rubrik Cluster" after the link has been created in Rubrik, se attached screenshot
The same command running on PowerShell 7.2.1 on the same Windows 10 completes as expected.

We have reproduced issue in another enviroment.

Provide information about the failure by issuing the command using the -Verbose command. Ensure that any identifiable information (server names, tokens, passwords) is removed from your logs before sharing this on GitHub.

Paste the verbose output from the command here
Below text i looping to infinity...
`VERBOSE: Description: Retrieve information for the latest of related events that match the value specified in any of the following categories: type, status, or ID, and
limit events by date.
VERBOSE: Build the URI
VERBOSE: URI = https://xxx/api/v1/event/latest
VERBOSE: Build the query parameters for
object_type,event_status,event_series_id,limit,object_name,event_type,before_date,after_date,after_id,object_ids,event_series_status
VERBOSE: URI = https://xxx/api/v1/event/latest?limit=15&object_ids=MssqlDatabase:::
VERBOSE: Submitting the request
VERBOSE: Invoking request with a custom timeout of 100 seconds
VERBOSE: GET https://xxx/api/v1/event/latest?limit=15&object_ids=MssqlDatabase:: with 0-byte payload
VERBOSE: received 15543-byte response of content type application/json
VERBOSE: Received HTTP Status 200
VERBOSE: Applying Rubrik.Event.5.2 TypeName to results
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikEvent
VERBOSE: Selected 5.2 API Data for Get-RubrikEvent
VERBOSE: Load API data for Get-RubrikEvent``

**Expected Behavior**:
Command should complete when Download link is created in Rubrik

**Steps to Reproduce**:
1. $RubrikDatabase = Get-RubrikDatabase -Name 'DatabaseName'
2. (Not Needed Really) New-RubrikSnapshot -id $RubrikDatabase.id -SLA $RubrikDatabase.effectiveSlaDomainName -Confirm:$false | Get-RubrikRequest -Type mssql -WaitForCompletion 
3. $url = Get-RubrikDatabaseDownloadLink -id $RubrikDatabase.id -SnapshotId "Latest"

**Context**:

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Not working
PS H:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.1320
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1320
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Works
PS C:\Temp> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.1
PSEdition                      Core
GitCommitId                    7.2.1
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


* **Rubrik PowerShell Module Version**: Use `Get-Module -ListAvailable Rubrik`
* **PowerShell Version**: Use `$PSVersiontable.PSVersion`
* **Operating System**: Use `$PSVersiontable.PSVersion` on PowerShell 6 and later, use `(Get-WMIObject win32_operatingsystem).Name` for Windows PowerShell

**Failure Logs**

Please include any relevant log snippets or files here, *IMPORTANT* all information will be visible publicly on GitHub. Do not include computer or user names, passwords, API tokens or any identifiable information when submitting failure logs.
![Get-RubrikDatabaseDownloadLink_failure](https://user-images.githubusercontent.com/61880083/152124214-c6b52f3a-0902-40b4-8382-61996f5468fa.PNG)

PS H:> Get-Module -ListAvailable Rubrik

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Script 6.0.0 Rubrik {Connect-Rubrik, Disconnect-Rubrik, Export-RubrikDatabase, Export-RubrikReport...}