Tag the EC2 instances with the build uuid.

This commit is contained in:
Jake Moshenko 2015-01-05 15:35:14 -05:00
parent dd7664328c
commit fc757fecad
2 changed files with 7 additions and 5 deletions

View file

@ -182,7 +182,8 @@ class EphemeralBuilderManager(BaseManager):
@coroutine
def schedule(self, build_job):
logger.debug('Calling schedule with job: %s', build_job.job_details['build_uuid'])
build_uuid = build_job.job_details['build_uuid']
logger.debug('Calling schedule with job: %s', build_uuid)
# Check if there are worker slots avialable by checking the number of jobs in etcd
allowed_worker_count = self._manager_config.get('ALLOWED_WORKER_COUNT', 1)
@ -223,7 +224,7 @@ class EphemeralBuilderManager(BaseManager):
raise Return(False)
logger.debug('Starting builder with executor: %s', self._executor)
builder_id = yield From(self._executor.start_builder(realm, token))
builder_id = yield From(self._executor.start_builder(realm, token, build_uuid))
# Store the builder in etcd associated with the job id
payload['builder_id'] = builder_id