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

Instances on EC2 don't get random suffix

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: jclouds-plugin
    • Labels:
      None
    • Environment:
      Ubuntu 12.04.3, Xen instance (on Rackspace Cloud)
    • Similar Issues:

      Description

      I've configured the jclouds plugin to launch VM's on EC2. The instances simply get the name I've specified, and don't get any random suffix as I've been told it should.

      I don't know if it's related, but even though I allowed two instances to be started, only one was ever used. Occasionally, two would be started, but only one ever appeared in Jenkins. Maybe it's due to the names not being unique.

      What information can I provide?

        Attachments

          Activity

          soren Soren Hansen created issue -
          abayer Andrew Bayer made changes -
          Field Original Value New Value
          Assignee abayer [ abayer ]
          Hide
          abayer Andrew Bayer added a comment -

          Pretty sure this was a bug in the version of jclouds - can you try the latest build from https://jenkins.ci.cloudbees.com/job/plugins/job/jclouds-plugin/lastStableBuild/org.jenkins-ci.plugins$jclouds-jenkins/?

          Show
          abayer Andrew Bayer added a comment - Pretty sure this was a bug in the version of jclouds - can you try the latest build from https://jenkins.ci.cloudbees.com/job/plugins/job/jclouds-plugin/lastStableBuild/org.jenkins-ci.plugins$jclouds-jenkins/?
          Hide
          johnrengelman John Engelman added a comment -

          Trying this with Jclouds-Jenkins-2.9-SNAPSHOT (running with jclouds-1.8) and this still doesn't work.
          The instance is created with the name of the EC2 template.

          Subsequent slaves are started and seemed to be configured, but never join into Jenkins as slaves.

          Show
          johnrengelman John Engelman added a comment - Trying this with Jclouds-Jenkins-2.9-SNAPSHOT (running with jclouds-1.8) and this still doesn't work. The instance is created with the name of the EC2 template. Subsequent slaves are started and seemed to be configured, but never join into Jenkins as slaves.
          Hide
          johnrengelman John Engelman added a comment -

          The problem is here: https://github.com/jenkinsci/jclouds-plugin/blob/master/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlave.java#L83

          That sets the Node name to be the metadata.getName() which is just the template name.

          I've fixed for myself by using a custom build that changes that line to use:

          metaData.getName() + "-" + metaData.getProviderId()
          
          Show
          johnrengelman John Engelman added a comment - The problem is here: https://github.com/jenkinsci/jclouds-plugin/blob/master/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlave.java#L83 That sets the Node name to be the metadata.getName() which is just the template name. I've fixed for myself by using a custom build that changes that line to use: metaData.getName() + "-" + metaData.getProviderId()
          ircbot Jenkins IRC Bot made changes -
          Component/s jclouds-plugin [ 16529 ]
          Component/s jclouds-jenkins [ 17483 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 151456 ] JNJira + In-Review [ 177963 ]
          felfert Fritz Elfert made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          felfert Fritz Elfert made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Hide
          felfert Fritz Elfert added a comment -

          Tested, verified and fixed in git using AWS-EC2.

          Show
          felfert Fritz Elfert added a comment - Tested, verified and fixed in git using AWS-EC2.
          felfert Fritz Elfert made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              abayer Andrew Bayer
              Reporter:
              soren Soren Hansen
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: