Skip to content
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

Merged
merged 10 commits into from
Mar 27, 2020
Merged

[Compute] az vmss set-orchestration-service-state: support vmss set orchestration service state #12756

merged 10 commits into from
Mar 27, 2020

Conversation

arrownj
Copy link
Contributor

@arrownj arrownj commented Mar 26, 2020

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.

@arrownj arrownj self-assigned this Mar 26, 2020
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
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.')
Copy link
Member

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

Copy link
Contributor Author

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'
Copy link
Member

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?

Copy link
Contributor Author

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')
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add this part.

Copy link
Contributor Author

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',
Copy link
Member

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

Copy link
Contributor Author

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.

@yungezz yungezz added Compute az vm/vmss/image/disk/snapshot Compute - VMSS az vmss labels Mar 26, 2020
@yungezz yungezz added this to the S167 milestone Mar 26, 2020
Copy link
Member

@fengzhou-msft fengzhou-msft left a 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.

Copy link
Contributor

@mmyyrroonn mmyyrroonn left a 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

@arrownj arrownj merged commit 8b855ec into Azure:dev Mar 27, 2020
@arrownj arrownj deleted the vmss_set_orchestration branch July 29, 2020 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compute - VMSS az vmss Compute az vm/vmss/image/disk/snapshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants