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

Customer recieving content body errors using Get-RubrikClusterInfo #604

Closed
mwpreston opened this issue Apr 2, 2020 · 1 comment · Fixed by #606
Closed

Customer recieving content body errors using Get-RubrikClusterInfo #604

mwpreston opened this issue Apr 2, 2020 · 1 comment · Fixed by #606

Comments

@mwpreston
Copy link
Contributor

Current Behavior:

Customer is trying to run Get-RubrikClusterInfo and receiving content-body errors. Believe this has something to do with Get-RubrikClusterInfo going direct to Submit-Request as when they run the same query with Invoke-RubrikRestCall (which will remove the body first) it works.

I believe removing the -Body $body from line 59 in Get-RubrikClusterInfo will resolve this issue

Get-RubrikClusterInfo -Verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikClusterInfo
VERBOSE: Selected 5.0 API Data for Get-RubrikClusterInfo
VERBOSE: Load API data for Get-RubrikClusterInfo
VERBOSE: Description: Retrieves advanced settings of the Rubrik cluster
VERBOSE: Build the URI
VERBOSE: URI = https://rubrik_ip/api/internal/node/*/cpu_cores_count
VERBOSE: Submitting the request
Invoke-WebRequest : Cannot send a content-body with this verb-type.
At C:\Program Files\WindowsPowerShell\Modules\Rubrik\5.0.1\Private\Invoke-RubrikWebRequest.ps1:20 char:19
+ ...       $result = Invoke-WebRequest -UseBasicParsing @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], ProtocolViolationException
    + FullyQualifiedErrorId : System.Net.ProtocolViolationException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Invoke-RubrikRESTCall -Endpoint node/*/cpu_cores_count -Method GET -api internal
count
-----
  360

Expected Behavior:

Expect it to return cluster info.

Steps to Reproduce:

Can't reproduce this in lab environment

@mwpreston
Copy link
Contributor Author

mwpreston commented Apr 3, 2020

Applies to Get-RubrikClusterStorage and Get-RubrikDNSSetting as well - will issue another PR

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

Successfully merging a pull request may close this issue.

1 participant