[Buildbot] #2898: EC2 spot instance bidding is too arcane

Buildbot trac trac at buildbot.net
Sun Sep 14 04:45:23 UTC 2014

#2898: EC2 spot instance bidding is too arcane
Reporter:  bgilbert     |      Owner:
    Type:  enhancement  |     Status:  new
Priority:  minor        |  Milestone:  undecided
 Version:  0.8.9        |   Keywords:
 EC2LatentBuildSlave computes its spot price bid by requesting the 24-hour
 price history, multiplying its average by a constant value, and checking
 that this does not exceed a configured maximum.  There are several
 problems with this:

 1. If the selected bid price is greater than the configured maximum,
 EC2LatentBuildSlave raises an exception.  It does not attempt to check
 that the current spot price is actually above this maximum, so it may give
 up when spot instances are actually available at an acceptable price.  It
 would be better to always make a bid, but cap the bid price at the
 configured maximum (i.e., `target_price = min(target_price,

 2. On Eight, a hardcoded `product_description` is used to fetch spot price
 history.  As a result, decisions may be based on the wrong history.

 3. When setting up EC2 spot instances, I would like to be able to
 configure a single value: the maximum hourly cost.  If the current spot
 price is <= that threshold, the instance should start; otherwise, the
 instance should not start.  At first glance, it appears this can be
 accomplished by configuring the desired `max_spot_price` and a huge
 `price_multiplier`, but that does not work because of point 1: launches
 will unconditionally fail.

 It's not clear to me what the current logic is trying to accomplish.  IMO
 the correct design is for EC2LatentBuildSlave to simply bid the
 `max_spot_price` every time.  What am I missing?

Ticket URL: <http://trac.buildbot.net/ticket/2898>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation

More information about the bugs mailing list