-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Compute] add VMSS Rolling Upgrade opt #17580
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
Conversation
| if proximity_placement_group is not None: | ||
| vmss.proximity_placement_group = {'id': proximity_placement_group} | ||
|
|
||
| if max_batch_instance_percent is not None or max_unhealthy_instance_percent is not None \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why new condition check? it's better to have comments
|
Do we have any conventions when adding a short option for the parameter? @qwordy If not, maybe we should have some. |
It is an opportunity that you can draft one document. |
| 'mode': upgrade_policy_mode, | ||
| 'rollingUpgradePolicy': { | ||
| 'maxBatchInstancePercent': max_batch_instance_percent, | ||
| 'maxUnhealthyInstancePercent': max_unhealthy_instance_percent, | ||
| 'maxUnhealthyUpgradedInstancePercent': max_unhealthy_upgraded_instance_percent, | ||
| 'pauseTimeBetweenBatches': pause_time_between_batches, | ||
| 'enableCrossZoneUpgrade': enable_cross_zone_upgrade, | ||
| 'prioritizeUnhealthyInstances': prioritize_unhealthy_instances | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If they are all not specified, do we need to set these Nones? Does it break existing VM commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to my test, None value will not change the properties' original values
| c.argument('max_batch_instance_percent', type=int, min_api='2020-12-01', | ||
| help='The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. Default: 20%') | ||
| c.argument('max_unhealthy_instance_percent', type=int, min_api='2020-12-01', | ||
| help='The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy. Default: 20%') | ||
| c.argument('max_unhealthy_upgraded_instance_percent', type=int, min_api='2020-12-01', | ||
| help='The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. Default: 20%') | ||
| c.argument('pause_time_between_batches', min_api='2020-12-01', | ||
| help='The wait time between completing the update for all virtual machines in one batch and starting the next batch. Default: 0 seconds') | ||
| c.argument('enable_cross_zone_upgrade', arg_type=get_three_state_flag(), min_api='2020-12-01', | ||
| help='Set this Boolean property will allow VMSS to ignore AZ boundaries when constructing upgrade batches, and only consider Update Domain and maxBatchInstancePercent to determine the batch size') | ||
| c.argument('prioritize_unhealthy_instances', arg_type=get_three_state_flag(), min_api='2020-12-01', | ||
| help='Set this Boolean property will lead to all unhealthy instances in a scale set getting upgraded before any healthy instances') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xfz11 Hi, I see that the min_api of these parameters is 2020-12-01, but in fact, these parameters are already supported in version 2020-06-01.
Swagger link: code link
So I would like to confirm that those parameters are expected to be supported only after version 2020-12-01, right? (in this case, profile 2020-09-01-hybrid does not support those parameters)
Description
resolve #16038
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.