[Buildbot] #2900: EC2 spot instances don't work with AMI filters

Buildbot trac trac at buildbot.net
Sun Sep 14 20:17:43 UTC 2014


#2900: EC2 spot instances don't work with AMI filters
----------------------+-----------------------
Reporter:  bgilbert   |      Owner:
    Type:  undecided  |     Status:  new
Priority:  minor      |  Milestone:  undecided
 Version:  0.8.9      |   Keywords:
----------------------+-----------------------
 If EC2LatentBuildSlave is configured with `spot_instance=True`,
 `valid_ami_owners`, and `valid_ami_location_regex`, the latent buildslave
 fails to substantiate.  `twistd.log` says:
 {{{
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 525, in __bootstrap
     self.__bootstrap_inner()
   File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 505, in run
     self.__target(*self.__args, **self.__kwargs)
 --- <exception caught here> ---
   File "/home/foo/env/local/lib/python2.7/site-
 packages/twisted/python/threadpool.py", line 196, in _worker
     result = context.call(ctx, function, *args, **kwargs)
   File "/home/foo/env/local/lib/python2.7/site-
 packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/home/foo/env/local/lib/python2.7/site-
 packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/home/foo/env/local/lib/python2.7/site-
 packages/buildbot/buildslave/ec2.py", line 360, in _request_spot_instance
     placement=self.placement)
   File "/home/foo/env/local/lib/python2.7/site-
 packages/boto/ec2/connection.py", line 1640, in request_spot_instances
     verb='POST')
   File "/home/foo/env/local/lib/python2.7/site-
 packages/boto/connection.py", line 1166, in get_list
     raise self.ResponseError(response.status, response.reason, body)
 boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
 <?xml version="1.0" encoding="UTF-8"?>
 <Response><Errors><Error><Code>InvalidAMIID.Malformed</Code><Message>Invalid
 id: "None" (expecting "ami-...")</Message></Error></Errors><RequestID
 >ca4663fd-ba5c-443a-b27d-d45980b4e06a</RequestID></Response>
 }}}

 The problem appears to be that `get_image()` is never called in this code
 path.  Instead, `self.ami` is passed directly to
 `request_spot_instances()`.

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


More information about the bugs mailing list