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

            imod Dominik Bartholdi created issue -

            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
            batmat Baptiste Mathus made changes -
            Field Original Value New Value
            Labels evergreen

            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
            batmat Baptiste Mathus made changes -
            Assignee FABRIZIO MANFREDI [ thoulen ] Baptiste Mathus [ batmat ]

            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 made changes -
            Link This issue is blocking JENKINS-54263 [ JENKINS-54263 ]
            batmat Baptiste Mathus made changes -
            Sprint Evergreen - Milestone 2 [ 516 ]
            batmat Baptiste Mathus made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            batmat Baptiste Mathus made changes -
            Rank Ranked higher
            batmat Baptiste Mathus made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            batmat Baptiste Mathus added a comment - Proposed fix as  https://github.com/jenkinsci/ec2-plugin/pull/314
            batmat Baptiste Mathus made changes -
            Remote Link This issue links to "PR (Web Link)" [ 21963 ]

            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
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]

            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.
            batmat Baptiste Mathus made changes -
            Status Reopened [ 4 ] In Progress [ 3 ]
            batmat Baptiste Mathus made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]

            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.
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            batmat Baptiste Mathus made changes -
            Released As (towards) 1.42
            bssmasta Billy Bunns made changes -
            Rank Ranked lower

            People

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

              Dates

                Created:
                Updated:
                Resolved: