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

[ec2-plugin] spot instance feature cannot be used within VPC

XMLWordPrintable

      The problem:

      Unable to launch a spot instance when using a VPC. Has anyone else had any success with this? I've seen reports of it working fine for users launching spot instances outside a VPC.

      Replicating and error message:

      When clicking 'provision via EC2' at jenkins:8080/computer I receive the following error

      Status Code: 400, AWS Service: AmazonEC2, AWS Request ID: 6079cf60-3c23-4ea7-935a-807bd5f81b95, AWS Error Code: InvalidParameterCombination, AWS Error Message: The parameter groupName cannot be used with the parameter subnet

      Investigation details:

      Launching an OnDemand instance within the same environment works fine. Also tried spinning up a spot instance using the AWS management console with the same details and was also able to spin one up.

      I've inspected the requestSpotInstanceRequest that gets sent to the AWS API and I can't see any mention of groupName. Below is the request I am sending.

      "InstanceCount => 1"
      "LaunchSpecification.SecurityGroup.1 => sg-ac5447c0"
      "LaunchSpecification.ImageId => ami-d97deee3"
      "Action => RequestSpotInstances"
      "LaunchSpecification.KeyName => sppbuild"
      "LaunchSpecification.UserData => SkVOS0lOU19V---moreuserdatawashere"
      "Type => persistent"
      "LaunchSpecification.SubnetId => subnet-dfad4fb6"
      "LaunchSpecification.InstanceType => c1.medium"
      "Version => 2012-12-01"
      "SpotPrice => 0.09"

      Any help with this issue would be greatly appreciated, if there is anymore information that would be of use I will be happy to provide it!

            francisu Francis Upton
            mriddle Matthew Riddle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: