Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57414

Azure VM agent is not able to use existing resource group in different regions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: _unsorted
    • Labels:
      None
    • Similar Issues:
    • Released As:
      1.0.1

      Description

      We are using a Jenkins hosted in Azure.

      Now we have created the first VM agents in west-europe, and reuse an existing resource group which is also linked to west-europe.

      When we want to create another VM agent within another region e.g. east-us2, we are getting the following message and the VM agent will get not deployed:

      _

      {"code":"InvalidResourceGroupLocation","message":"Invalid resource group location 'eastus2'. The Resource group already exists in location 'westeurope'."}

      _

      It seems that the plugin trys to create a new resource group in each region, but we want to reuse the existing resource group.

       

      Within the Azure Portal we are able to create in our resource group (west-europe) also VMs, which are hosted in different regions e.g. east-us2.

       

      Could you please help and support us?

        Attachments

          Activity

          Hide
          jieshe Jie Shen added a comment -

          How do you configure the template here? Do you choose the Using existing for Resource Group name?

          Show
          jieshe Jie Shen added a comment - How do you configure the template here? Do you choose the Using existing for Resource Group name?
          Hide
          chrissy Christian Meyer added a comment -

          We are using an existing Resource group within the cloud configuration. And within the same cloud configuration (Microsoft Azure VM Agents) we have added one template for a Windows 10 VM in Europe and another one for a Windows 10 VM in US.

          The first template is working fine, but for the second template we are getting the error message, which was mentioned in the ticket.

          Show
          chrissy Christian Meyer added a comment - We are using an existing Resource group within the cloud configuration. And within the same cloud configuration (Microsoft Azure VM Agents) we have added one template for a Windows 10 VM in Europe and another one for a Windows 10 VM in US. The first template is working fine, but for the second template we are getting the error message, which was mentioned in the ticket.
          Hide
          jieshe Jie Shen added a comment -

          Christian Meyer confirmed this is a bug in the plugin, I will prepare a fix for this.

          Show
          jieshe Jie Shen added a comment - Christian Meyer confirmed this is a bug in the plugin, I will prepare a fix for this.
          Hide
          jieshe Jie Shen added a comment -

          I have drafted a PR https://github.com/jenkinsci/azure-vm-agents-plugin/pull/149 to discuss this.

          Show
          jieshe Jie Shen added a comment - I have drafted a PR  https://github.com/jenkinsci/azure-vm-agents-plugin/pull/149  to discuss this.

            People

            Assignee:
            jieshe Jie Shen
            Reporter:
            chrissy Christian Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: