-
Bug
-
Resolution: Fixed
-
Critical
-
Jenkins ver. 2.150.2, google compute engine plugin1.0.8, using Bitnami installer from google marketplace.
Ran into an issue where after updating the Google Compute Engine Plugin 1.0.8 cloud environment module for the latest security updates, not having an Instance Template in google cloud causes jobs to queue up with no agents being built. The logs show
Provisioning node from config com.google.jenkins.plugins.computeengine.InstanceConfiguration@50d1bc17 for excess workload of 1 units of label 'proj1' Jan 19, 2019 1:01:52 AM INFO com.google.jenkins.plugins.computeengine.ComputeEngineCloud availableNodeCapacityFound capacity for 8 nodes in cloud gce Jan 19, 2019 1:01:52 AM WARNING com.google.jenkins.plugins.computeengine.ComputeEngineCloud provisionError provisioning node com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid value for field 'sourceInstanceTemplate': ''. The URL is malformed.", "reason" : "invalid" } ], "message" : "Invalid value for field 'sourceInstanceTemplate': ''. The URL is malformed." } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469) at com.google.jenkins.plugins.computeengine.client.ComputeClient.insertInstance(ComputeClient.java:345) at com.google.jenkins.plugins.computeengine.InstanceConfiguration.provision(InstanceConfiguration.java:287) at com.google.jenkins.plugins.computeengine.ComputeEngineCloud.provision(ComputeEngineCloud.java:159) at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:715) at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:320) at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:61) at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:809) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) 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)
If it's required that the Instance Template is required, then the field should be marked as required in the configuration screen, but currently does not require it. Once we created an instance template and assigned it under 'Machine Configuration'->'Template to use', the agents started being built correctly.