-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Compute] az vmss set-orchestration-service-state: support vmss set orchestration service state #12756
Conversation
short-summary: Change ServiceState property for a given service within a VMSS. | ||
examples: | ||
- name: Change ServiceState property for AutomaticRepairs | ||
text: az vmss set-orchestration-service-state --service-name AutomaticRepairs --action Resume --name MyScaleSet --resource-group MyResourceGroup |
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.
how to get the state? This will impact command name, will it be orchestration-service-state set or set-orchestration-service-state
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.
As I know, currently there is only one set operation for it. The result of this operation will show in the instance view. We can use az vmss get-instance-view -g rg -n vmss_name
to get the orchestration services state. This is also another request they asked in the email. It is also supported in this PR.
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.
thanks for clarification. As long as there will no command on show/list etc, the command should be ok. Another question, I remembered that automatic instance repair command is preview, what's status of this command?
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.
we have already remove the Preview tag as they asked for this before.
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.
yes. should we mark this as preview also?
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.
I will send an email to get their confirmation first.
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.
confirmed not to add Preview tag.
@@ -595,6 +596,10 @@ def load_arguments(self, _): | |||
|
|||
with self.argument_context('vmss nic list') as c: | |||
c.argument('virtual_machine_scale_set_name', arg_type=vmss_name_type, options_list=['--vmss-name'], id_part=None) | |||
|
|||
with self.argument_context('vmss set-orchestration-service-state') as c: | |||
c.argument('service_name', arg_type=get_enum_type(OrchestrationServiceNames), help='The name of the service.') |
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.
the name of the orchestration service
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.
updated
@@ -179,7 +179,8 @@ def load_command_table(self, _): | |||
|
|||
compute_disk_encryption_set_sdk = CliCommandType( | |||
operations_tmpl='azure.mgmt.compute.operations#DiskEncryptionSetsOperations.{}', | |||
client_factory=cf_disk_encryption_set | |||
client_factory=cf_disk_encryption_set, | |||
operation_group='disk_encryption_sets' |
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.
typo? added disk_encryption_sets group?
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.
good find. forgot to remove it.
self.check('vmss.automaticRepairsPolicy.gracePeriod', 'PT30M') | ||
]) | ||
self.cmd('vmss set-orchestration-service-state -g {rg} -n {vmss} --service-name {service_name} --action Resume') | ||
self.cmd('vmss set-orchestration-service-state -g {rg} -n {vmss} --service-name {service_name} --action Suspend') |
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.
How can we check the effect?
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.
will add this part.
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.
added
@@ -71,7 +71,7 @@ | |||
'azure-mgmt-botservice~=0.2.0', | |||
'azure-mgmt-cdn==4.1.0rc1', | |||
'azure-mgmt-cognitiveservices~=5.0.0', | |||
'azure-mgmt-compute~=11.0', | |||
'azure-mgmt-compute~=12.0', |
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.
thanks for the full live test regression. @qwordy +1 for live test framework
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.
I'm running the full live test for VM in my local. And hope there will be no new failure.
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.
LGTM for changes in core.
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.
Just rerun the test in monitor. LGTM
Description of PR (Mandatory)
(Why this PR? What is changed? What is the effect? etc. A high-quality description can accelerate the review process)
Testing Guide
(Example commands with explanations)
History Notes:
(Fill in the following template if multiple notes are needed, otherwise PR title will be used for history note.)
[Component Name 1] (BREAKING CHANGE:) (az command:) make some customer-facing change.
[Component Name 2] (BREAKING CHANGE:) (az command:) make some customer-facing change.
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.