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 vm create: Fix the bug when creating Flex VMSS without SKU and VM profile #22016

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

zhoxing-ms
Copy link
Contributor

@zhoxing-ms zhoxing-ms commented Apr 11, 2022

Description

This problem comes from ICM. Just as communicating with @fitzgeraldsteele on Teams, CLI needs to fix the following problems:

  1. Error handling issue: 'NoneType' object has no attribute 'lower' when creating Flex VMSS without --vm-sku parameter
  2. When creating VM/VMSS, if the user does not pass in --location, the location from resource group can be used by default (there is already this logic, but it is not triggered due to this bug)
  3. For creating VMSS, the information of VM profile and SKU should be either passed in or not passed in. Therefore, if users pass in the --vm-sku parameter, CLI needs to verify that users must also pass in the --image parameter

Testing Guide

Because if the --zone parameter is added in the test, the recorded file will be very large. Therefore, instead of adding the corresponding test case, upload the screenshot of this case
Screenshot 2022-04-11 113529

History Notes

[Compute] az vm create: Fix the bug of "NoneType object has no attribute lower" when creating Flex VMSS without --vm-sku parameter


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost requested a review from yonzhan April 11, 2022 08:27
@ghost ghost added the Auto-Assign Auto assign by bot label Apr 11, 2022
@ghost ghost assigned zhoxing-ms Apr 11, 2022
@ghost ghost added this to the Apr 2022 (2022-04-26) milestone Apr 11, 2022
@ghost ghost added the Compute az vm/vmss/image/disk/snapshot label Apr 11, 2022
'--ppg {ppg} --platform-fault-domain-count 3 --admin-username vmtest',
'--ppg {ppg} --platform-fault-domain-count 3',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix the following errors:

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n "error": {\r\n "code": "BadRequest",\r\n "message": "Virtual Machine Scale Set with orchestration mode 'Flexible' and a Virtual Machine profile must use managed disks."\r\n }\r\n}"}]}}

--admin-username vmtest was added from PR #21761 by mistake. It will result in adding redundant VM profile when creating an empty VMSS

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 11, 2022

Compute

@fitzgeraldsteele
Copy link

fitzgeraldsteele commented Apr 13, 2022 via email

@fitzgeraldsteele
Copy link

Can we also check that just specifying --image still works? If that still works, then the other fixes look good to me!

@zhoxing-ms
Copy link
Contributor Author

Can we also check that just specifying --image still works? If that still works, then the other fixes look good to me!

Yes, we have run relevant tests in test_quick_create_flexible_vmss

@zhoxing-ms zhoxing-ms merged commit e9660f7 into Azure:dev Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants