| |
@@ -1,47 +0,0 @@
|
| |
- From a835c5283ac34af35418aa12b62e03b0894e5e31 Mon Sep 17 00:00:00 2001
|
| |
- From: Neal Gompa <ngompa13@gmail.com>
|
| |
- Date: Mon, 16 Aug 2021 21:20:13 -0400
|
| |
- Subject: [PATCH] ec2: Set AMI for latent worker before making spot request
|
| |
-
|
| |
- When trying to set up latent workers where the AMI is dynamically
|
| |
- discovered as part of instantiating workers, we want to make sure
|
| |
- that AMI is set before we make the spot request so that it is used
|
| |
- for the spot request.
|
| |
-
|
| |
- (cherry picked from commit 0310a1672692d5c39a55d6769490533d71925534)
|
| |
- ---
|
| |
- .../newsfragments/enable-ami-runtime-determinism.bugfix | 1 +
|
| |
- master/buildbot/worker/ec2.py | 2 +-
|
| |
- 2 files changed, 2 insertions(+), 1 deletion(-)
|
| |
- create mode 100644 master/buildbot/newsfragments/enable-ami-runtime-determinism.bugfix
|
| |
-
|
| |
- diff --git a/master/buildbot/newsfragments/enable-ami-runtime-determinism.bugfix b/master/buildbot/newsfragments/enable-ami-runtime-determinism.bugfix
|
| |
- new file mode 100644
|
| |
- index 000000000..ade48e2bd
|
| |
- --- /dev/null
|
| |
- +++ b/master/buildbot/newsfragments/enable-ami-runtime-determinism.bugfix
|
| |
- @@ -0,0 +1 @@
|
| |
- +Set AMI for latent worker before making spot request to enable dynamically setting AMIs for instantiating workers
|
| |
- diff --git a/master/buildbot/worker/ec2.py b/master/buildbot/worker/ec2.py
|
| |
- index ab60d5b95..382e4dc00 100644
|
| |
- --- a/master/buildbot/worker/ec2.py
|
| |
- +++ b/master/buildbot/worker/ec2.py
|
| |
- @@ -448,6 +448,7 @@ class EC2LatentWorker(AbstractLatentWorker):
|
| |
- log.msg('%s %s requesting spot instance with price %0.4f' %
|
| |
- (self.__class__.__name__, self.workername, bid_price))
|
| |
-
|
| |
- + image = self.get_image()
|
| |
- reservations = self.ec2.meta.client.request_spot_instances(
|
| |
- SpotPrice=str(bid_price),
|
| |
- LaunchSpecification=self._remove_none_opts(
|
| |
- @@ -473,7 +474,6 @@ class EC2LatentWorker(AbstractLatentWorker):
|
| |
- raise LatentWorkerFailedToSubstantiate()
|
| |
- instance_id = request['InstanceId']
|
| |
- self.instance = self.ec2.Instance(instance_id)
|
| |
- - image = self.get_image()
|
| |
- instance_id, start_time = self._wait_for_instance()
|
| |
- return instance_id, image.id, start_time
|
| |
-
|
| |
- --
|
| |
- 2.31.1
|
| |
-
|
| |