Skip to content

Update Update-AzVmssInstance.md #25627

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

microsoftuser64
Copy link

This change is proposed due to a change request by a customer from a case that I worked on as the Microsoft Azure Support Engineer. The customer submitted was VMSS update failure case to Azure Support. The case included an error message that stated that there was a "Conflict with concurrent request". The Cx used the parameters in this document to apply the updates to their VMSS instances. After some technical analysis with their cloud solution architect, it was the discovered that the -AsJob parameter in their commands was causing this error since the jobs were being asynchronously executed as background jobs and throws this concurrent request conflict error. I believe it would be good to state this in this documentation to help other Azure users prevent this error from occurring and resulting in an unhealthy VMSS instance. The customer also made this document update request.

Here is a sample of the command that the customer was running:

$VMSS = Get-AzVmssVM -ResourceGroupName "myResourceGroup" -VmScaleSetName "myScaleSet" foreach ($bi in $VMSS)
{
Update-AzVmssInstance -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -InstanceId "myInstanceID" -AsJob | Out-Null
}

Thanks!

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

This change is proposed due to a change request by a customer from a case that I worked on as the Microsoft Azure Support Engineer. The  customer submitted was VMSS update failure case to Azure Support. The case included an error message that stated that there was a "Conflict with concurrent request". The Cx used the parameters in this document to apply the updates to their VMSS instances. After some technical analysis with their cloud solution architect, it was the discovered that the -AsJob parameter in their commands was causing this error since the jobs were being asynchronously executed as background jobs and throws this concurrent request conflict error. I believe it would be good to state this in this documentation to help other Azure users prevent this error from occurring and resulting in an unhealthy VMSS instance. The customer also made this document update request. 

Here is a sample of the command that the customer was running: 

$VMSS = Get-AzVmssVM -ResourceGroupName "myResourceGroup" -VmScaleSetName "myScaleSet"
foreach ($bi in $VMSS)
 {
    Update-AzVmssInstance -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -InstanceId "myInstanceID" -AsJob | Out-Null
}

Thanks!
Copy link

azure-client-tools-bot-prd bot commented Jul 24, 2024

🔄Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
🔄Help Example Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows
🔄Help File Existence Check
🔄PowerShell Core - Windows
🔄Windows PowerShell - Windows

Copy link
Contributor

Thank you for your contribution microsoftuser64! We will review the pull request and get back to you soon.

@microsoftuser64
Copy link
Author

microsoftuser64 commented Jul 24, 2024 via email

@microsoftuser64
Copy link
Author

#sign-off

@VeryEarly VeryEarly assigned VeryEarly and unassigned VeryEarly Jul 25, 2024
@dolauli
Copy link
Contributor

dolauli commented Jul 31, 2024

Is this issue caused by a service limitation? If so, we'd better add an explanation for the limitation in https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/, since the issue potentially happens in any clients except for Azure PowerShell.

@dolauli dolauli self-assigned this Jul 31, 2024
@grizzlytheodore
Copy link
Member

how it's showing in MD file:
image

@dolauli dolauli removed their assignment Aug 29, 2024
@msJinLei msJinLei self-assigned this Aug 29, 2024
@msJinLei
Copy link
Contributor

Will discuss with the team

@msJinLei
Copy link
Contributor

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@msJinLei
Copy link
Contributor

msJinLei commented Sep 4, 2024

@microsoftuser64 The content of the document you added breaks static analysis and I try to move it to "Notes" section and it still fails. You have to remove some markdown labels to pass to static analysis. It may due to PlatyPS' limitation.
You can go to commit b4880a5 for you original change.

Copy link

github-actions bot commented Sep 4, 2024

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

Copy link

github-actions bot commented Sep 5, 2024

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@YanaXu
Copy link
Contributor

YanaXu commented Jan 7, 2025

Hi @microsoftuser64,

Please join your github account to Azure org.

<br>
An example of where the "-AsJob" is used in the foreach loop is shown below:

```powershell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this part to

<pre><code>
$VMSS = Get-AzVmssVM -ResourceGroupName "myResourceGroup" -VmScaleSetName "myScaleSet"
foreach ($bi in $VMSS)
{
    Update-AzVmssInstance -ResourceGroupName "myResourceGroup" -VMScaleSetName "myScaleSet" -InstanceId "myInstanceID" -AsJob 
}
</code></pre>

@vidai-msft
Copy link
Contributor

@microsoftuser64 I am converting this PR as draft since it has no progress for long time. Please mark it as ready for review once the comments have been addressed. Thank you for your contribution!

@vidai-msft vidai-msft marked this pull request as draft May 27, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants