You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: VirtualMachineService.GetVirtualMachinesMetricID method throws panic when it is trying to access the VMs response from server in below line of code. This happens when the count in the response is 1 but the actual VirtualMachinesMetrics array in the reponse is nil or empty. This is causing panic in the caller CAPC
@rajeshvenkata Can you please post the response of list virtualmachinesmetrics name=<name_of_the_vm> using Cloudmonkey - the CLI. Because, it is quite odd that count is 1, but it fails to retrieve the VM id.
@Pearl1594 Thanks for looking into this. Sure, I will try to get the response from the customer. In the meanwhile, should the code also be checking if array is nil or empty before accessing the VM array in the response? Or do you think this should not happen ideally?
Problem: VirtualMachineService.GetVirtualMachinesMetricID method throws panic when it is trying to access the VMs response from server in below line of code. This happens when the count in the response is 1 but the actual VirtualMachinesMetrics array in the reponse is nil or empty. This is causing panic in the caller CAPC
panic error is happening at: https://github.com/apache/cloudstack-go/blob/main/cloudstack/VirtualMachineService.go#L5543
error:
panic: runtime error: index out of range [0] with length 0
version of cloudstack-go used:
2.16.1
Please help investigate this error and let us know if this response is not expected
The text was updated successfully, but these errors were encountered: