-
Notifications
You must be signed in to change notification settings - Fork 87
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
Unprotect the VM and update retention for existing SLA is not working #689
Comments
Thanks for reporting this @suren-rubr, I'll take a look at how we can improve this behavior in the module. I have tested this in our environment and confirmed that this is indeed a bug. I'll update you here once I have some code ready. |
Hi @suren-rubr, I've posted the initial code to resolve this issue in the following PR #690 Let me know if this helps resolve your issue |
Hi @jaapbrasser , Thanks for looking into this; I tried the changes but still the retention is set forever rather than previous SLA;
|
Hello @suren-rubr, I have staged the changes in this PR: #714 Regards, Jaap Brasser |
Current Behavior:
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.Protect-RubrikVM -id VirtualMachine:::dc91d5d5-c1d1-4ea7-8eb7-f5ee60e805c3-vm-218331 -DoNotProtect -ExistingSnapshotRetention RetainSnapshots -verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Protect-RubrikVM
VERBOSE: Selected 1.0 API Data for Protect-RubrikVM
VERBOSE: Load API data for Protect-RubrikVM
VERBOSE: Description: Update a VM with the specified SLA Domain.
VERBOSE: Build the URI
VERBOSE: URI = https://<cluster_ip>/api/v1/vmware/vm/VirtualMachine:::dc91d5d5-c1d1-4ea7-8eb7-f5ee60e805c3-vm-218331
VERBOSE: Build the query parameters for
VERBOSE: URI = https://<cluster_IP>/api/v1/vmware/vm/VirtualMachine:::dc91d5d5-c1d1-4ea7-8eb7-f5ee60e805c3-vm-218331
VERBOSE: List of set parameters: [id, VirtualMachine:::dc91d5d5-c1d1-4ea7-8eb7-f5ee60e805c3-vm-218331] [DoNotProtect, True] [ExistingSnapshotRetention, RetainSnapshots] [Verbose, True] [SLAID, UNPROTECTED]
VERBOSE: Build the body parameters
VERBOSE: Adding configuredSlaDomainId...
VERBOSE: Adding existingSnapshotRetention...
VERBOSE: Body = {
"configuredSlaDomainId": "UNPROTECTED",
"existingSnapshotRetention": "RetainSnapshots"
}
VERBOSE: Submitting the request
VERBOSE: Invoking request with a custom timeout of 100 seconds
VERBOSE: PATCH https://<cluster_IP>/api/v1/vmware/vm/VirtualMachine:::dc91d5d5-c1d1-4ea7-8eb7-f5ee60e805c3-vm-218331 with 94-byte payload
VERBOSE: received 4648-byte response of content type application/json
VERBOSE: Received HTTP Status 200 VERBOSE: Formatting return value VERBOSE: Applying Rubrik.VMwareVM TypeName to results
Name Operating System SLA Domain RBS Status Id
AdilUbuntu1 Ubuntu Linux (64-bit) Unprotected Unregistered VirtualMachine:::dc91d5d5-c1d1-4ea7-8eb7-f5ee60e805c3-vm-218331
Expected Behavior: To update the retention SLA as Existing SLA while unprotecting the VM.
Steps to Reproduce:
Please provide detailed steps for reproducing the issue.
Issue: Seems like its broken on both 5.1 and 5.2. I used API code capture and we seem to be calling a different endpoint when unprotecting the VM. The endpoint we hit is POST /v2/sla_domain/UNPROTECTED/assign.
Also, /v1/vmware/vm/{id} does not have
Context:
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Get-Module -ListAvailable Rubrik
ModuleType Version Name PSEdition ExportedCommands
Script 5.0.3 Rubrik Desk {Connect-Rubrik, Disconnect-Rubrik, Export-RubrikDatabase, Export-RubrikReport…}
$PSVersiontable.PSVersion
$PSVersiontable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel
6 2 3
$PSVersiontable.PSVersion
on PowerShell 6 and later, use(Get-WMIObject win32_operatingsystem).Name
for Windows PowerShellFailure 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.
The text was updated successfully, but these errors were encountered: