[BUG]: Updating a VMSS with new capacity leads to outdated VM models
See original GitHub issueDescribe the bug When updating the scaling capacity of a Virtual Machine Scale Set via Azure Java SDK such as
vmss.update()
.withCapacity(newCapacity)
.apply();
the other existing VMs of the VMSS are then somehow outdated and the UI shows they do not have the latest VMSS model applied.
When however changing the scaling capacity via the UI the VMs of the VMSS still have the latest VMSS model applied.
Exception or Stack Trace There are no errors, it simply seems to be a mismatch in behavior between the API and the SDK
To Reproduce Steps to reproduce the behavior:
Code Snippet see above
Expected behavior I would suggest that simply changing the scaling count should not affect the VMSS model of the VMs itself
Screenshots If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
- OS: [Windows]
- IDE: [IntelliJ]
- Library/Libraries: [e.g. com.azure:azure-resourcemanager:2.20.0]
- Java version: [LibericaJDK-16]
- Frameworks: [Quarkus]
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
- [x ] Bug Description Added
- [x ] Repro Steps Added
- [x ] Setup information Added
Issue Analytics
- State:
- Created 10 months ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
Thanks @hendrik-schaffer for your detailed explanation of your situation. I’ll check if the patch pattern can resolve the altering of the latest model state.
@weidongxu-microsoft This may be an issue we want to fix. When the vmss’s
UpgradePolicy
is set toAutomatic
, all existing VMs in the vmss is likely to be rebooted if theLatest Model
isNo
. I’ll have that checked too.Sure. Please find below the JSON View of our VMSS
To update the VMSS via the SDK, we are using the following code snippet: