Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-RubrikAvailabilityGroup does not respect PrimaryClusterID #777

Closed
clumnah opened this issue Jul 16, 2021 · 1 comment · Fixed by #800
Closed

Get-RubrikAvailabilityGroup does not respect PrimaryClusterID #777

clumnah opened this issue Jul 16, 2021 · 1 comment · Fixed by #800
Assignees
Labels

Comments

@clumnah
Copy link
Contributor

clumnah commented Jul 16, 2021

Current Behavior:

When running Get-RubrikAvailabilityGroup it is return back all records for an availability group, including the ones on a remote cluster. I have tried to include the PrimaryClusterID with 'local' and it is still returning back both records.

$RubrikAvailabilityGroup = Get-RubrikAvailabilityGroup -GroupName $AvailabilityGroup -PrimaryClusterID '*local*' -Server $Global:RubrikConnection.server
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikSQLInstance
VERBOSE: Selected 1.0 API Data for Get-RubrikSQLInstance
VERBOSE: Load API data for Get-RubrikSQLInstance
VERBOSE: Description: Returns a list of summary information for Microsoft SQL instances.
VERBOSE: Build the URI
VERBOSE: URI = https://sand2-rbk01/api/v1/mssql/instance
VERBOSE: Build the query parameters for instance_id,primary_cluster_id
VERBOSE: URI = https://sand2-rbk01/api/v1/mssql/instance
VERBOSE: Submitting the request
VERBOSE: Invoking request with a custom timeout of 300 seconds
VERBOSE: GET https://sand2-rbk01/api/v1/mssql/instance with 0-byte payload
VERBOSE: received 13122-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: Filter match = Hostname
VERBOSE: Filter match = SLA
VERBOSE: Applying Rubrik.MSSQLInstance TypeName to results
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikAvailabilityGroup
VERBOSE: Selected 1.0 API Data for Get-RubrikAvailabilityGroup
VERBOSE: Load API data for Get-RubrikAvailabilityGroup
VERBOSE: Description: Get summary information for Microsoft SQL availability groups
VERBOSE: Build the URI
VERBOSE: URI = https://sand2-rbk01/api/internal/mssql/availability_group
VERBOSE: Build the query parameters for primary_database_id
VERBOSE: URI = https://sand2-rbk01/api/internal/mssql/availability_group
VERBOSE: Submitting the request
VERBOSE: Invoking request with a custom timeout of 300 seconds
VERBOSE: GET https://sand2-rbk01/api/internal/mssql/availability_group with 0-byte payload
VERBOSE: received 3296-byte response of content type application/json
VERBOSE: Received HTTP Status 200
VERBOSE: Formatting return value
VERBOSE: Filter the results
VERBOSE: Filter match = GroupName
VERBOSE: Filter match = SLAID
VERBOSE: Filter match = SLA
VERBOSE: Applying Rubrik.AvailabilityGroup TypeName to results

Expected Behavior:
By including the PrimaryClusterID parameter with local as the value, it should return back 1 record.
Steps to Reproduce:

@jaapbrasser
Copy link
Contributor

Looks like it's not adding it to the uri which is why it doesn't get excluded. Thanks for reporting this @clumnah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants