chef-partners/azure-chef-extension

type_handler_version = "1210.13"

mcalik77 opened this issue · 10 comments

It is not installing on windows machine if we put the version 1210.13 - It was working fine until 2 days ago. When I tried to deploy with terraform it is not able to install it. If I tried with 1210.12 it is installing.

We use terraform resources to install chef_extension. (type_handler_version = "1210.13")

resource azurerm_virtual_machine_extension chef_extention {
  count = var.chef_extention_enabled ? 1 : 0

  name      = "ChefClient"
  publisher = "Chef.Bootstrap.WindowsAzure"
  type      = "ChefClient"
  
  type_handler_version = "1210.13"
  virtual_machine_id   = azurerm_windows_virtual_machine.virtual_machine.id

  tags = local.tags

  settings = <<SETTINGS
    {  
      "client_rb": "ssl_verify_mode  \"verify_none\"",
      "validation_key_format": "base64encoded",
      "custom_json_attr": {
        "policy_group": "<policy_group>", 
        "policy_name": "<policy_name>"
      },
      "CHEF_LICENSE" : "accept-no-persist", 
      "bootstrap_options": {
        "chef_node_name": "${azurerm_windows_virtual_machine.virtual_machine.name}",
        "chef_server_url": "<server_url>",
        "validation_client_name": "<client_name>"
      },
      "environment_variables": {
        "SASTOKEN": "${module.sas_token.sas}"
      },
      "runlist":"recipe[chef-client::default]"
    }
  SETTINGS
  protected_settings = <<SETTINGS
    {
      "validation_key": "${var.validation_pem}"
    }
  SETTINGS
depends_on = [azurerm_virtual_machine_extension.join_domain]
}

Had no issue until 3 days ago. Something must have changed on version 1210.13.5.1 . Terraform gets stuck when it comes to installing the extension. This is the error code we receive once we troubleshoot inside the VM.

Capture

Manual installation works:

msiexec /i C:\Users\ADMINB~1\AppData\Local\Temp\2\chef-client-17.0.242-1-x64.msi /quiet

HI @mcalik77 & @okandamar0610
This error is coming with latest Chef Infra Client version 17.0.242, we have created an issue for the same chef/chef#11516.

Meanwhile you can use previous versions of chef client with the help of these options 'bootstrap_version': '16.13.16', 'bootstrap_channel':'stable' or 'chef_package_url' : 'download url of required chef-client version'

Thank you!

The PR #345 temporarily resolves this issue as we have pinned the extension to chef 16 until chef 17 is tested and verified.

Yes, it works. I have added bootstrap version and channel.

      "bootstrap_version" : "16.13.16",
      "bootstrap_channel" : "stable",

Is this now resolved for the customer, please update, thank you

Hi @okandamar0610, so should we mark this issue as resolved and close it?

When chef-17 issue will get resolved we will update on this issue, right now we have pinned the extension to chef 16 so it won't be causing this error even without using "bootstrap_version" option.
Thank you

Yes, we can mark this issue as resolved.
Thank you.

I am closing this case and ticket 27752.

Thank you @okandamar0610 and @TerrieB1 closing this issue now.