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

fails to start agent because of missing label

    XMLWordPrintable

Details

    • Task
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • ec2-plugin
    • AWS
      ec2-plugin: 1.41
      Jenkins: 2.138.2
    • Evergreen - Milestone 2
    • (towards) 1.42

    Description

      I upgraded to version 1.41 and now launching of a new agent fails with this:

       

      SlaveTemplate{ami='ami-06870ca4fe1151af2', labels='agent'}. Attempting to provision slave needed by excess workload of 1 units
      Oct 26, 2018 8:58:29 AM INFO hudson.plugins.ec2.SlaveTemplate logProvisionInfoSlaveTemplate{ami='ami-06870ca4fe1151af2', labels='agent'}. Considering launching
      Oct 26, 2018 8:58:29 AM INFO hudson.plugins.ec2.SlaveTemplate logProvisionInfoSlaveTemplate{ami='ami-06870ca4fe1151af2', labels='agent'}. Setting Instance Initiated Shutdown Behavior : ShutdownBehavior.Terminate
      Oct 26, 2018 8:58:29 AM INFO hudson.plugins.ec2.SlaveTemplate logProvisionInfoSlaveTemplate{ami='ami-06870ca4fe1151af2', labels='agent'}. Looking for existing instances with describe-instance: {Filters: [{Name: image-id,Values: [ami-06870ca4fe1151af2]}, {Name: instance-type,Values: [t2.medium]}, {Name: key-name,Values: [YooJks]}, {Name: instance.group-name,Values: [yoo-test18493-YootureJksAgentSecurityGroup-VL4P3JGXGAG3]}, {Name: tag:jenkins_server_url,Values: [null]}, {Name: tag:jenkins_slave_type,Values: [demand_EC2 Agent]}],InstanceIds: [],}
      Oct 26, 2018 8:58:29 AM WARNING hudson.plugins.ec2.EC2Cloud provisionSlaveTemplate{ami='ami-06870ca4fe1151af2', labels='agent'}. Exception during provisioning
      com.amazonaws.services.ec2.model.AmazonEC2Exception: Tag value cannot be null. Use empty string instead. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 72b4d323-8867-40c3-9c96-638297b6b3b0)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1658)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1322)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1072)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:745)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:719)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:701)
      	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:669) 

       

      ...btw. the new permissions are added to AMI

      Attachments

        Issue Links

          Activity

            Did you have define the server url in the global config ?  it is used today to create unique tag in AWS.

            thoulen FABRIZIO MANFREDI added a comment - Did you have define the server url in the global config ?  it is used today to create unique tag in AWS.

            thoulen thanks - that really fixed the issue, do you really need the url for anything else then identifying the master? If not, I think you would be a lot better by using the instance identifier as described here: https://wiki.jenkins.io/display/JENKINS/Instance+Identity

            imod Dominik Bartholdi added a comment - thoulen thanks - that really fixed the issue, do you really need the url for anything else then identifying the master? If not, I think you would be a lot better by using the instance identifier as described here:  https://wiki.jenkins.io/display/JENKINS/Instance+Identity

            I'm seeing this too on Evergreen, about to propose a fix. If anyone is also working on this, please let me know

            batmat Baptiste Mathus added a comment - I'm seeing this too on Evergreen, about to propose a fix. If anyone is also working on this, please let me know
            batmat Baptiste Mathus added a comment - Filed https://github.com/jenkinsci/instance-identity-module/pull/13  for the future

            thoulen I've assigned this issue to myself to clarify. But feel free to take it back and tell me if you are working on this. Thanks!

            batmat Baptiste Mathus added a comment - thoulen I've assigned this issue to myself to clarify. But feel free to take it back and tell me if you are working on this. Thanks!
            batmat Baptiste Mathus added a comment - Proposed fix as  https://github.com/jenkinsci/ec2-plugin/pull/314

            Thanks, it is merged, it will be part of the 1.42

            thoulen FABRIZIO MANFREDI added a comment - Thanks, it is merged, it will be part of the 1.42

            Still present actually, I do not understand how I missed it... Anyway, proposed a followup https://github.com/jenkinsci/ec2-plugin/pull/319 and I did test this one. Going to double check in a few minutes with a fresh setup to be sure before I mark it ready for review / merge.

            batmat Baptiste Mathus added a comment - Still present actually, I do not understand how I missed it... Anyway, proposed a followup https://github.com/jenkinsci/ec2-plugin/pull/319 and I did test this one. Going to double check in a few minutes with a fresh setup to be sure before I mark it ready for review / merge.

            https://github.com/jenkinsci/ec2-plugin/pull/319 confirmed to fix the issue for me. Waiting for review.

            batmat Baptiste Mathus added a comment - https://github.com/jenkinsci/ec2-plugin/pull/319 confirmed to fix the issue for me. Waiting for review.

            People

              batmat Baptiste Mathus
              imod Dominik Bartholdi
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: