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

Overprovision should be default true. Terraform and the service back … #1322

Merged
merged 4 commits into from
Jun 1, 2018

Conversation

VaijanathB
Copy link
Contributor

@VaijanathB VaijanathB commented May 30, 2018

…end is considering this as default false when nothing is specified. I have run all the VMSS tests. Most of them pass with some unrelated failures.

TestAccAzureRMVirtualMachineScaleSet
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run=TestAccAzureRMVirtualMachineScaleSet -timeout 180m
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importBasic
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importBasic (355.53s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importBasic_managedDisk
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importBasic_managedDisk (354.05s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importBasic_managedDisk_withZones
--- FAIL: TestAccAzureRMVirtualMachineScaleSet_importBasic_managedDisk_withZones (101.70s)
	testing.go:513: Step 0 error: Error applying: 1 error(s) occurred:
		
		* azurerm_virtual_machine_scale_set.test: 1 error(s) occurred:
		
		* azurerm_virtual_machine_scale_set.test: compute.VirtualMachineScaleSetsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="ResourceTypeNotSupportAvailabilityZones" Message="The resource type 'virtualMachineScaleSets' does not support availability zones at location 'southcentralus' and api-version '2017-12-01'."
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importLinux
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importLinux (367.60s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importLoadBalancer
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importLoadBalancer (365.93s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importOverProvision
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importOverProvision (364.06s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importExtension
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importExtension (367.29s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_importMultipleExtensions
--- PASS: TestAccAzureRMVirtualMachineScaleSet_importMultipleExtensions (364.91s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basic
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basic (360.84s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicPublicIP
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicPublicIP (354.82s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicAcceleratedNetworking
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicAcceleratedNetworking (356.50s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_bootDiagnostic
--- PASS: TestAccAzureRMVirtualMachineScaleSet_bootDiagnostic (353.95s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_networkSecurityGroup
--- PASS: TestAccAzureRMVirtualMachineScaleSet_networkSecurityGroup (363.09s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicWindows
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicWindows (401.86s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_singlePlacementGroupFalse
--- PASS: TestAccAzureRMVirtualMachineScaleSet_singlePlacementGroupFalse (367.48s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_linuxUpdated
--- PASS: TestAccAzureRMVirtualMachineScaleSet_linuxUpdated (522.11s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_customDataUpdated
--- PASS: TestAccAzureRMVirtualMachineScaleSet_customDataUpdated (461.82s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicLinux_managedDisk
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicLinux_managedDisk (363.52s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicWindows_managedDisk
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicWindows_managedDisk (470.57s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicWindows_managedDisk_resize
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicWindows_managedDisk_resize (651.61s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicLinux_managedDiskNoName
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicLinux_managedDiskNoName (355.63s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_basicLinux_disappears
--- PASS: TestAccAzureRMVirtualMachineScaleSet_basicLinux_disappears (426.61s)
=== RUN   TestAccAzureRMVirtualMachineScaleSet_planManagedDisk
--- FAIL: TestAccAzureRMVirtualMachineScaleSet_planManagedDisk (103.15s)
	testing.go:513: Step 0 error: Error applying: 1 error(s) occurred:
		
		* azurerm_virtual_machine_scale_set.test: 1 error(s) occurred:
		
		* azurerm_virtual_machine_scale_set.test: compute.VirtualMachineScaleSetsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="ResourcePurchaseValidationFailed" Message="User failed validation to purchase resources. Error message: 'Legal terms have not been accepted for this item on this subscription. To accept legal terms using PowerShell, please use Get-AzureRmMarketplaceTerms and Set-AzureRmMarketplaceTerms API(https://go.microsoft.com/fwlink/?linkid=862451) or deploy via the Azure portal to accept the terms'"

…end is considering this as default false when nothing is specified.
@VaijanathB
Copy link
Contributor Author

We have had discussion with VMSS team and they suggested that we should make this Default True.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @VaijanathB

Thanks for this PR - I've taken a look through and left a comment inline, if we can fix this up it should be good to merge. In general we need to be a little careful with default changes; however in this particular case (since it's a top-level object outside a hash function) it should be fine, providing we message it appropriately in the changelog (which we'll handle post-merge).

Thanks!

@@ -245,7 +245,7 @@ The following arguments are supported:
* `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* `sku` - (Required) A sku block as documented below.
* `upgrade_policy_mode` - (Required) Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, `Manual` or `Automatic`.
* `overprovision` - (Optional) Specifies whether the virtual machine scale set should be overprovisioned.
* `overprovision` - (Optional) Specifies whether the virtual machine scale set should be overprovisioned. Default set to true when not specified.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this "Defaults to true" to match the other docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -106,6 +106,7 @@ func resourceArmVirtualMachineScaleSet() *schema.Resource {
"overprovision": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

bear in mind this will currently force a change for existing resources - so this is going to need to go out in a major version & we're going to want to call this out in the release notes (cc @katbyte)

@VaijanathB
Copy link
Contributor Author

@tombuildsstuff Thanks for the review. I have updated the doc to change as requested. It should be fine if this goes in next major release.

* `overprovision` - (Optional) Specifies whether the virtual machine scale set should be overprovisioned.
* `single_placement_group` - (Optional) Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Default is true. Changing this forces a
* `overprovision` - (Optional) Specifies whether the virtual machine scale set should be overprovisioned. Defaults to `true`.
* `single_placement_group` - (Optional) Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Defaults to `true`. Changing this forces a
Copy link
Contributor

Choose a reason for hiding this comment

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

pushed a commit to quote both of these values

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM - I'll add a message to the changelog about this 👍

@tombuildsstuff tombuildsstuff removed the request for review from JunyiYi June 1, 2018 10:51
@tombuildsstuff tombuildsstuff modified the milestones: Soon, 1.7.0 Jun 1, 2018
@tombuildsstuff tombuildsstuff merged commit 8de4693 into master Jun 1, 2018
@tombuildsstuff tombuildsstuff deleted the vmssOverprovision branch June 1, 2018 10:54
tombuildsstuff added a commit that referenced this pull request Jun 1, 2018
tombuildsstuff added a commit that referenced this pull request Jun 1, 2018
@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants