azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[BUG] WaitForCompletionResponseAsync on ComputeArmOperation seems to be stuck in infinite loop
Library name and version
Azure.ResourceManager.Compute 1.0.0
Describe the bug
When calling (and awaiting) VirtualMachineResource.PowerOnAsync(Azure.WaitUntil.Completed), or VirtualMachineResource.PowerOnAsync(Azure.WaitUntil.Started) and then ArmComputeOperation.WaitForCompleteResponseAsync() thereafter, it seems the operation does not complete in a foreseeable amount of time.
Specifically, my underlying (Linux) VM is already good and ready to go (SSH-able) in around 1-2min but the operation can go on for more than 5 minutes without any response.
Expected behavior
PowerOnAsync(Azure.WaitUntil.Completed) should return once the VM has started (usually not more than 1-2 min).
Actual behavior
PowerOnAsync(Azure.WaitUntil.Completed) stays in an infinite loop as seen in WaitForCompletionAsync(bool async, OperationInternalBase operation, TimeSpan? suggestedInterval, CancellationToken cancellationToken) in OperationPoller.cs
Reproduction Steps
Calling PowerOnAsync(Azure.WaitUntil.Completed) on VirtualMachineResource.
Environment
No response
Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Compute - VM:0.44959334,Compute:0.12373655,Azure.Core:0.06547255'
Label prediction was below confidence level 0.6 for Model:CategoryLabels: 'Mgmt:0.52411294,Client:0.47227308,Service:0.0032392365'
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @jonganej , Thank you for using Azure SDK for .NET. We can't repro your issue on our machine with following code:
var rg = (await sub.GetResourceGroups().GetAsync("rgName")).Value;
var collection = rg.GetVirtualMachines();
var vm = (await collection.GetAsync("vmName")).Value;
await vm.PowerOffAsync(WaitUntil.Completed);
Console.WriteLine("PowerOff");
await vm.PowerOnAsync(WaitUntil.Completed);
Console.WriteLine("PowerOn");
Please try the latest package and see if the issue is resloved.
Hi @jonganej. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Hi @jonganej, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.