Closed tsarna closed 3 years ago
@xccc-msft Please take a look.
@tsarna Thanks for reporting this. I have created #1304 to fix this. Before we release new version, you may take below workaround
computeManager.virtualMachineScaleSets().inner().list();
Describe the bug
trying to list Virtual Machine Scale Sets that exists results in an NPE thrown from VirtualMachineScaleSetImpl:initializeChildrenFromInner, line 195, which is the first IF statement:
This means either
this.inner()
orthis.inner().virtualMachineProfile()
must be null, but I can't tell which from the stack trace and I was not able to debug in situ (observed in logs from a customer).Exception or Stack Trace
The relevant section is:
To Reproduce It's not clear what data the Azure API is returning to cause this, nor under what circumstances it does this. I am not able to reproduce it on any of the subscriptions I have access to, I have only observed it in a customer's log file.
Code Snippet Just calling
.list()
on a VirtualMachineScaleSets.Expected behavior The
list()
call should be tolerant of whatever it is that the REST API is returning in this case and return a list of scale sets and not fail in this case. It would be better to return VMSS instances with missing data (say, missing the VM profile, if that's the issue) or to skip the problem instances entirely than to fail completely, as currently there is no way to work around this failure so all functionality related to scale sets must be disabled in my application.Screenshots N/A
Setup (please complete the following information):
Additional context Add any other context about the problem here.
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report