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

Support for automatic_instance_repair on the Orchestrated Virtual Machine Scale Set azure rm resource #24336

Open
1 task done
githubofkrishnadhas opened this issue Dec 26, 2023 · 3 comments
Labels
enhancement preview service/vmss Virtual Machine Scale Sets

Comments

@githubofkrishnadhas
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

Hi Team,

I am using azurerm_orchestrated_virtual_machine_scale_set to spin up Axure VMSS using terraform.

The reason why i am using azurerm_orchestrated_virtual_machine_scale_set is that i need to test and try out the spot mix property introduced by Microsoft which enables us to have on demand as well as spot instances in same virtual machine scaleset.

I was using azurerm_linux_virtual_machine_scale_set resource and saw that this will not support spot mix, and only support uniform orchestration mode as either completely ondemand or spot .

I was unaware of azurerm_orchestrated_virtual_machine_scale_set module and raised the below issue: #24184

and from this i came to know about this resouce block.

the issue is that i need to use automatic_instance_repair as we will be using docker to set up the application and in case the containers went down this is a feature that can help us to an extent.

I saw this warning in terraform azurerm documentation:

To enable the automatic_instance_repair, the Orchestrated Virtual Machine Scale Set must have a valid health_probe_id

and for this to work we need to have a upgrade_mode and health_probe_id. but i cant see where to put it as its not clear in the documentation and code.

I can see comments saying this is not supported in ovmss

This could be very helpful if you can integrate it also with OVMSS.

New or Affected Resource(s)/Data Source(s)

azurerm_orchestrated_virtual_machine_scale_set

Potential Terraform Configuration

This is how its in azurerm_linux_virtual_machine_scale_set 

resource "azurerm_linux_virtual_machine_scale_set" "vmss" {
  name                = azurerm_resource_group.vmss.name
  location            = azurerm_resource_group.vmss.location
  resource_group_name = azurerm_resource_group.vmss.name
  #tags                = azurerm_resource_group.vmss.tags
  depends_on = [
    azurerm_lb_rule.vmss
  ]
  upgrade_mode = "Manual"
  health_probe_id = "${ var.auto_repair ? azurerm_lb_probe.vmss.id : null}"
  zones = var.zones
  sku = "${var.sku}"
  instances = "${var.autoscale_default}"

// rest of terraform code
}

References

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/orchestrated_virtual_machine_scale_set

https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/compute/orchestrated_virtual_machine_scale_set_resource.go#L339-L341

#24184
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/spot-priority-mix?tabs=portal

@mybayern1974 mybayern1974 added enhancement service/vmss Virtual Machine Scale Sets labels Dec 27, 2023
@harshavmb
Copy link
Contributor

Hi @githubofkrishnadhas ,

Upgrade Mode policy for Flex orchestration mode is currently in preview mode. To activate it you could use below az-cli command ..

az feature registration create --subscription <sub-name/id> -n VmssFlexRollingUpgrade --namespace Microsoft.Compute

Having spoken to MS product team working on this feature, I am told that this is expected to be GA by the end Q1 2024. I don't think azurerm provider should support this for a private preview functionality as preview features are quite unstable.

MS product team told me that they will update when this feature is GA, then we could consider.

Disclaimer :: I am also one of the heavy patronizers of vmss flex mode, so I would definitely like to have this feature but only when API is stable.

@githubofkrishnadhas
Copy link
Author

Hi @harshavmb Thanks for the update. Will wait for this to be generally available. :)

@darren-johnson
Copy link

Is there any update on this issue? I have just had to log 28270 in respect to rolling_upgrade_policy being missing too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement preview service/vmss Virtual Machine Scale Sets
Projects
None yet
Development

No branches or pull requests

5 participants