[JIRA] (JENKINS-59277) Provisioning issue after upgrade to version 1.2.0

2 views
Skip to first unread message

claas@cd-email.de (JIRA)

unread,
Sep 9, 2019, 2:38:04 AM9/9/19
to jenkinsc...@googlegroups.com
Claas Diederichs created an issue
 
Jenkins / Improvement JENKINS-59277
Provisioning issue after upgrade to version 1.2.0
Issue Type: Improvement Improvement
Assignee: Azure DevOps
Components: azure-vm-agents-plugin
Created: 2019-09-09 06:37
Priority: Major Major
Reporter: Claas Diederichs

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)}}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

claas@cd-email.de (JIRA)

unread,
Sep 9, 2019, 2:39:02 AM9/9/19
to jenkinsc...@googlegroups.com

jieshe@microsoft.com (JIRA)

unread,
Sep 9, 2019, 3:14:02 AM9/9/19
to jenkinsc...@googlegroups.com
Jie Shen assigned an issue to Jie Shen
Change By: Jie Shen
Assignee: Azure DevOps Jie Shen

jieshe@microsoft.com (JIRA)

unread,
Sep 9, 2019, 3:31:03 AM9/9/19
to jenkinsc...@googlegroups.com
Jie Shen commented on Improvement JENKINS-59277
 
Re: Provisioning issue after upgrade to version 1.2.0

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?

claas@cd-email.de (JIRA)

unread,
Sep 10, 2019, 3:18:02 AM9/10/19
to jenkinsc...@googlegroups.com

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()
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jieshe@microsoft.com (JIRA)

unread,
Sep 12, 2019, 2:53:01 AM9/12/19
to jenkinsc...@googlegroups.com
Jie Shen commented on Improvement JENKINS-59277

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

jieshe@microsoft.com (JIRA)

unread,
Sep 12, 2019, 3:34:03 AM9/12/19
to jenkinsc...@googlegroups.com
Jie Shen resolved as Fixed
 
Change By: Jie Shen
Status: Open Resolved
Resolution: Fixed
Released As: 1.2.1
Reply all
Reply to author
Forward
0 new messages