Skip to content

New-RubrikSnapshot, Protect-RubrikFileset - Cmdlets using -slaname w/identical Local/Remote SLA names are failing #720

Open
@stevenctong

Description

@stevenctong

Current Behavior:

Cmdlets where you pass in 'slaname' on a cluster with SLAs that have identically named Local and Remote SLAs are failing. In the example below the cluster has a Local and Remote SLA named '1d-30d-NoArchive'. The cmdlet finds both the Local and Remote SLA IDs and tries passing it to the REST API call where it should only be passing the Local SLA ID.

$req = New-RubrikSnapshot -id $i -SLA $slaName -confirm:$false -verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for New-RubrikSnapshot
VERBOSE: Selected 1.0 API Data for New-RubrikSnapshot
VERBOSE: Load API data for New-RubrikSnapshot
VERBOSE: Description: Create an on-demand snapshot for the given object ID
VERBOSE: Performing the operation "Testing SLA" on target "1d-30d-NoArchive".
VERBOSE: Determining the SLA Domain id
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikSLA
VERBOSE: Selected 5.0 API Data for Get-RubrikSLA
VERBOSE: Load API data for Get-RubrikSLA
VERBOSE: Description: Retrieve summary information for all SLA Domains
VERBOSE: Build the URI
VERBOSE: URI = https://amer1-rbk01.rubrikdemo.com/api/v2/sla_domain
VERBOSE: Build the query parameters for primary_cluster_id
VERBOSE: URI = https://amer1-rbk01.rubrikdemo.com/api/v2/sla_domain
VERBOSE: Submitting the request
VERBOSE: Invoking request with a custom timeout of 100 seconds
VERBOSE: GET https://amer1-rbk01.rubrikdemo.com/api/v2/sla_domain with 0-byte payload
VERBOSE: received 79485-byte response of content type application/json
VERBOSE: Received HTTP Status 200                                                                                                                                                             VERBOSE: Formatting return value                                                                                                                                                              VERBOSE: Filter the results                                                                                                                                                                   VERBOSE: Filter match = Name
VERBOSE: Getting SLA Domain frequency summary
VERBOSE: No advanced config found
VERBOSE: Getting SLA Domain frequency summary
VERBOSE: No advanced config found
VERBOSE: Applying Rubrik.SLADomain TypeName to results
VERBOSE: Multiple URIs detected. Selecting URI based on Fileset:::36ca4a05-8625-4595-983c-fcfef805997c
VERBOSE: Loading Fileset API data
VERBOSE: List of set parameters: [id, Fileset:::36ca4a05-8625-4595-983c-fcfef805997c] [SLA, 1d-30d-NoArchive] [Confirm, False] [Verbose, True] [SLAID, 4d37f114-6592-4899-912b-7d589f79108a 3edea4e7-6866-420f-aca1-cd083c5301d1]
VERBOSE: Build the body parameters
VERBOSE: Adding slaId...
VERBOSE: Adding forceFullSnapshot...
VERBOSE: Body = {
  "slaId": "4d37f114-6592-4899-912b-7d589f79108a 3edea4e7-6866-420f-aca1-cd083c5301d1"
}
VERBOSE: Submitting the request
VERBOSE: Invoking request with a custom timeout of 100 seconds
VERBOSE: POST https://amer1-rbk01.rubrikdemo.com/api/v1/fileset/Fileset:::36ca4a05-8625-4595-983c-fcfef805997c/snapshot with 90-byte payload
VERBOSE: received 120-byte response of content type text/plain
WARNING: Could not find SlaDomain with id=4d37f114-6592-4899-912b-7d589f79108a 3edea4e7-6866-420f-aca1-cd083c5301d1
OperationStopped: /Users/steventong/.local/share/powershell/Modules/Rubrik/Private/Submit-Request.ps1:106
Line |
 106 |                      throw $_.Exception
     |                      ~~~~~~~~~~~~~~~~~~
     | Response status code does not indicate success: 404 (Not Found).

This also happened with the 'Protect-RubrikFileset' cmdlet so I assume it will happen to any cmdlet that uses 'slaname'.

Expected Behavior:

When passing a SLA Name we expect it to find and use the Local SLA and not any Remote ones.

Steps to Reproduce:

  1. Have a cluster with identically named SLAs for a Local and Remote SLA
  2. Attempt to use a cmdlet that uses 'slaname' as an argument, eg 'New-RubrikSnapshot'

Context:

  • Rubrik PowerShell v5.2.0
  • Powershell v7.0.1
  • OS Mac Catalina 10.15.7

I just upgraded to Rubrik Powershell v5.2 from v5.0 and I don't believe this issue was occurring previously.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions