[JIRA] (JENKINS-56907) Spot price check doesn't use the right product type

5 views
Skip to first unread message

jballet@edgelab.ch (JIRA)

unread,
Apr 5, 2019, 7:57:02 AM4/5/19
to jenkinsc...@googlegroups.com
Jonathan Ballet created an issue
 
Jenkins / Bug JENKINS-56907
Spot price check doesn't use the right product type
Issue Type: Bug Bug
Assignee: FABRIZIO MANFREDI
Components: ec2-plugin
Created: 2019-04-05 11:56
Environment: ec-plugin=1.42
Labels: spot ec2-plugin ec2
Priority: Minor Minor
Reporter: Jonathan Ballet

The "Check Current Spot Price" button in the configuration does a request to AWS to retrieve the spot price history of the specified instance type but it doesn't set the "Product Description" and displays the first price returned. This can differs greatly from the actual spot price expected to be returned.

For example, a request for the spot price at the moment returns:

{'NextToken': '',
 'SpotPriceHistory': [{'AvailabilityZone': 'eu-central-1a',
   'InstanceType': 'c5.2xlarge',
   'ProductDescription': 'SUSE Linux',
   'SpotPrice': '0.241700',
   'Timestamp': datetime.datetime(2019, 4, 5, 8, 47, 39, tzinfo=tzutc())},
  {'AvailabilityZone': 'eu-central-1a',
   'InstanceType': 'c5.2xlarge',
   'ProductDescription': 'Linux/UNIX',
   'SpotPrice': '0.141700',
   'Timestamp': datetime.datetime(2019, 4, 5, 8, 47, 39, tzinfo=tzutc())},
  {'AvailabilityZone': 'eu-central-1a',
   'InstanceType': 'c5.2xlarge',
   'ProductDescription': 'Windows',
   'SpotPrice': '0.500600',
   'Timestamp': datetime.datetime(2019, 4, 5, 5, 39, 27, tzinfo=tzutc())}],
 'ResponseMetadata': {'RequestId': '8913a3bc-ed16-4617-acd4-ba5955f27142',
  'HTTPStatusCode': 200,
  'HTTPHeaders': {'content-type': 'text/xml;charset=UTF-8',
   'content-length': '1243',
   'date': 'Fri, 05 Apr 2019 11:47:57 GMT',
   'server': 'AmazonEC2'},
  'RetryAttempts': 0}}

I'm interested by the "Linux/UNIX product" (normal on-demand price is $0.3880). The current spot price for this type of product is $0.1417 but the current price reported by Jenkins after clicking on the button will be for "SUSE Linux", which is not as interesting.

In some cases, the spot price displayed by Jenkins is actually higher than the on-demand price for the product we are interested in:

{'NextToken': '',
 'SpotPriceHistory': [{'AvailabilityZone': 'eu-central-1a',
   'InstanceType': 't2.medium',
   'ProductDescription': 'Windows',
   'SpotPrice': '0.034100',
   'Timestamp': datetime.datetime(2019, 4, 5, 11, 39, 58, tzinfo=tzutc())},
  {'AvailabilityZone': 'eu-central-1a',
   'InstanceType': 't2.medium',
   'ProductDescription': 'SUSE Linux',
   'SpotPrice': '0.116100',
   'Timestamp': datetime.datetime(2019, 4, 5, 11, 39, 21, tzinfo=tzutc())},
  {'AvailabilityZone': 'eu-central-1a',
   'InstanceType': 't2.medium',
   'ProductDescription': 'Linux/UNIX',
   'SpotPrice': '0.016100',
   'Timestamp': datetime.datetime(2019, 4, 5, 11, 39, 21, tzinfo=tzutc())}],
 'ResponseMetadata': {'RequestId': 'b566355f-2261-4ee4-90df-1baed9c3c97f',
  'HTTPStatusCode': 200,
  'HTTPHeaders': {'content-type': 'text/xml;charset=UTF-8',
   'content-length': '1240',
   'date': 'Fri, 05 Apr 2019 11:54:50 GMT',
   'server': 'AmazonEC2'},
  'RetryAttempts': 0}}

(displayed spot price is $0.1161 but the on-demand price for "Linux/UNIX" is $0.0536)

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jballet@edgelab.ch (JIRA)

unread,
Jun 27, 2019, 3:56:01 AM6/27/19
to jenkinsc...@googlegroups.com

jballet@edgelab.ch (JIRA)

unread,
Jun 27, 2019, 4:44:02 AM6/27/19
to jenkinsc...@googlegroups.com

FABRIZIO MANFREDI I'll let you properly close the issue, I'm not sure what's the proper way to do it

raihaan.shouhell@autodesk.com (JIRA)

unread,
Jul 24, 2019, 9:06:09 AM7/24/19
to jenkinsc...@googlegroups.com
Raihaan Shouhell assigned an issue to Raihaan Shouhell
 
Change By: Raihaan Shouhell
Assignee: FABRIZIO MANFREDI Raihaan Shouhell

raihaan.shouhell@autodesk.com (JIRA)

unread,
Jul 24, 2019, 9:06:09 AM7/24/19
to jenkinsc...@googlegroups.com
Raihaan Shouhell resolved as Fixed
Change By: Raihaan Shouhell
Status: Open Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages