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

Spot instance requests use entirely different instance

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
      None
    • Environment:
      ec2 1.42, jenkins 2.167
    • Similar Issues:
    • Released As:
      1.45

      Description

      Spinning up a build agent template that uses spot pricing appears to use the ID of an instance provisioned by a totally different spot request. e.g. 

      Spot instance id in provision: sir-d29i7m7m
      Mar 06, 2019 10:50:36 AM INFO hudson.plugins.ec2.EC2RetentionStrategy start
      Start requested for jenkins-test-agent (sir-d29i7m7m)
      Mar 06, 2019 10:50:36 AM INFO hudson.plugins.ec2.EC2Cloud log
      Launching instance: i-0569a98d4e6447e66
      

      In this example, instance i-0569a98d4e6447e66 is an instance fulfilled by a spot request created 1 hour prior. The spot instance provisioned by sir-d29i7m7m eventually starts but is untracked anywhere by Jenkins.

      This is incredibly frustrating, because I'm ending up terminating totally unrelated instances because the config cannot be changed once the agent has been created and of course it cannot ssh in to instances created with an entirely different keypair.

      I'm not sure how to debug this further, so would appreciate any advice in being able to provide more information or if this is a dupe.

        Attachments

          Activity

          Hide
          rjbwtr Richard Bowater added a comment -

          Using version 1.39 of the plugin appears to work. It correctly waits for an instance to be created from the spot instance request and uses that for the build agent configuration. I have no idea why 1.42 is not respecting the spot instance request id when getting details of the instance to use for the agent.

          Show
          rjbwtr Richard Bowater added a comment - Using version 1.39 of the plugin appears to work. It correctly waits for an instance to be created from the spot instance request and uses that for the build agent configuration. I have no idea why 1.42 is not respecting the spot instance request id when getting details of the instance to use for the agent.
          Hide
          thoulen FABRIZIO MANFREDI added a comment -

          Some fix has been introduced in the 1.45 for the spot instace ID

          Show
          thoulen FABRIZIO MANFREDI added a comment - Some fix has been introduced in the 1.45 for the spot instace ID

            People

            • Assignee:
              thoulen FABRIZIO MANFREDI
              Reporter:
              rjbwtr Richard Bowater
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: