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

Provisioning issue after upgrade to version 1.2.0

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: _unsorted
    • Labels:
      None
    • Similar Issues:
    • Released As:
      1.2.1

      Description

      After upgrading to version 1.2.0 from version 1.1.1, node provisioning stopped working entirely.

      We are using our own templates for windows and linux. Reverting to plugin version 1.1.1 fixed the issue.

      {{com.microsoft.azure.vmagent.exceptions.AzureCloudException: Status code 400, {"error":

      {"code":"InvalidTemplate","message":"Deployment template parse failed: 'Required property 'name' expects a value but got null. Path ''.'."}


      at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:51)
      at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:33)
      at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.createDeployment(AzureVMManagementServiceDelegate.java:562)
      at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.createDeployment(AzureVMManagementServiceDelegate.java:175)
      at com.microsoft.azure.vmagent.AzureVMAgentTemplate.provisionAgents(AzureVMAgentTemplate.java:1150)
      at com.microsoft.azure.vmagent.AzureVMCloud$1.call(AzureVMCloud.java:784)
      at com.microsoft.azure.vmagent.AzureVMCloud$1.call(AzureVMCloud.java:780)
      Caused: java.util.concurrent.ExecutionException
      at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      at java.util.concurrent.FutureTask.get(FutureTask.java:192)
      at com.microsoft.azure.vmagent.AzureVMCloud$2.call(AzureVMCloud.java:819)
      Caused: com.microsoft.azure.vmagent.exceptions.AzureCloudException
      at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:54)
      at com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:33)
      at com.microsoft.azure.vmagent.AzureVMCloud$2.call(AzureVMCloud.java:821)
      at com.microsoft.azure.vmagent.AzureVMCloud$2.call(AzureVMCloud.java:808)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)}}

        Attachments

          Issue Links

            Activity

            Hide
            jieshe Jie Shen added a comment -

            Claas Diederichs Thanks for reporting this issue. It seems that your configuration misses some value for the new template version. But I cannot figure out which property is it. Is it possible to provide your cloud configuration without credentials to help me reproduce your issue?

            Show
            jieshe Jie Shen added a comment - Claas Diederichs Thanks for reporting this issue. It seems that your configuration misses some value for the new template version. But I cannot figure out which property is it. Is it possible to provide your cloud configuration without credentials to help me reproduce your issue?
            Hide
            claasd Claas Diederichs added a comment -

            Hi,

            we are using our own templates and we are using private subnets, maybe one of those is the culprint.

            Here is the configuration code for our cloud (I removed project specific values):

            cloud = new AzureVMCloudBuilder()
                .withCloudName("Azure Cloud")
                .withAzureCredentialsId("azure-sp")
                .withMaxVirtualMachinesLimit("10")
                .withExistingResourceGroupName('<rg_group>')
                .build()     
            
            List templates = []
            final String storageAccount = '<storage-account>'
            final String vNetName = '<vnet>'
            final String subnetName = '<subnet>'
            final String vNetResourceGroupName = '<subnet_rg>'
            
            templates.add(new AzureVMTemplateBuilder()
                .withName('linux')
                .withDescription("Linux Agent")
                .withLabels("linux docker")
                .withLocation("West Europe")
                .withWorkspace('/mnt/jenkins')
                .withVirtualMachineSize('Standard_D2_v3')
                .withExistingStorageAccount(storageAccount)
                .addNewAdvancedImage()
                .withCustomManagedImage("/subscriptions/<subscription>/resourceGroups/<rg_group>/providers/Microsoft.Compute/images/linux-image-latest")
                .withInitScript("chmod 0777 /mnt/\nusermod -a -G docker azure")
                .withRunScriptAsRoot(true)
                .withDoNotUseMachineIfInitFails(true)
                .withVirtualNetworkName(vNetName)
                .withVirtualNetworkResourceGroupName(vNetResourceGroupName)
                .withSubnetName(subnetName)
                .withPreInstallSsh(false)
                .withUsePrivateIP(true)
                .endAdvancedImage()
                .withAdminCredential("jenkins-login")
                .addNewIdleRetentionStrategy("10") // minutes
                .build())
            
            cloud.setVmTemplates(templates)
            Jenkins.get().clouds.add(cloud)
            Jenkins.get().save()
            
            Show
            claasd Claas Diederichs added a comment - Hi, we are using our own templates and we are using private subnets, maybe one of those is the culprint. Here is the configuration code for our cloud (I removed project specific values): cloud = new AzureVMCloudBuilder() .withCloudName( "Azure Cloud" ) .withAzureCredentialsId( "azure-sp" ) .withMaxVirtualMachinesLimit( "10" ) .withExistingResourceGroupName( '<rg_group>' ) .build() List templates = [] final String storageAccount = '<storage-account>' final String vNetName = '<vnet>' final String subnetName = '<subnet>' final String vNetResourceGroupName = '<subnet_rg>' templates.add( new AzureVMTemplateBuilder() .withName( 'linux' ) .withDescription( "Linux Agent" ) .withLabels( "linux docker" ) .withLocation( "West Europe" ) .withWorkspace( '/mnt/jenkins' ) .withVirtualMachineSize( 'Standard_D2_v3' ) .withExistingStorageAccount(storageAccount) .addNewAdvancedImage() .withCustomManagedImage( "/subscriptions/<subscription>/resourceGroups/<rg_group>/providers/Microsoft.Compute/images/linux-image-latest" ) .withInitScript( "chmod 0777 /mnt/\nusermod -a -G docker azure" ) .withRunScriptAsRoot( true ) .withDoNotUseMachineIfInitFails( true ) .withVirtualNetworkName(vNetName) .withVirtualNetworkResourceGroupName(vNetResourceGroupName) .withSubnetName(subnetName) .withPreInstallSsh( false ) .withUsePrivateIP( true ) .endAdvancedImage() .withAdminCredential( "jenkins-login" ) .addNewIdleRetentionStrategy( "10" ) // minutes .build()) cloud.setVmTemplates(templates) Jenkins.get().clouds.add(cloud) Jenkins.get().save()
            Hide
            jieshe Jie Shen added a comment -

            Claas Diederichs Thanks for your information here. I have made a fix for this.

            Show
            jieshe Jie Shen added a comment - Claas Diederichs Thanks for your information here. I have made a fix for this.

              People

              Assignee:
              jieshe Jie Shen
              Reporter:
              claasd Claas Diederichs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: