azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[BUG] WaitForCompletionResponseAsync on ComputeArmOperation seems to be stuck in infinite loop

Open jonganej opened this issue 3 years ago • 2 comments
trafficstars

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

jonganej avatar Sep 22 '22 11:09 jonganej

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'

azure-sdk avatar Sep 22 '22 11:09 azure-sdk

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar Sep 22 '22 12:09 jsquire

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.

HarveyLink avatar Aug 11 '23 02:08 HarveyLink

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.

github-actions[bot] avatar Aug 11 '23 02:08 github-actions[bot]

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.

github-actions[bot] avatar Aug 18 '23 04:08 github-actions[bot]