Handle the case where we cannot write the tags on the build nodes
This commit is contained in:
parent
258588b914
commit
2eaec092f0
1 changed files with 12 additions and 6 deletions
|
@ -143,12 +143,18 @@ class EC2Executor(BuilderExecutor):
|
|||
raise ExecutorException('EC2 started wrong number of instances!')
|
||||
|
||||
launched = AsyncWrapper(reservation.instances[0])
|
||||
yield From(launched.add_tags({
|
||||
'Name': 'Quay Ephemeral Builder',
|
||||
'Realm': realm,
|
||||
'Token': token,
|
||||
'BuildUUID': build_uuid,
|
||||
}))
|
||||
|
||||
for i in range(0, 2):
|
||||
try:
|
||||
yield From(launched.add_tags({
|
||||
'Name': 'Quay Ephemeral Builder',
|
||||
'Realm': realm,
|
||||
'Token': token,
|
||||
'BuildUUID': build_uuid,
|
||||
}))
|
||||
except boto.exception.EC2ResponseError:
|
||||
logger.exception('Failed to write EC2 tags (attempt #%s)', i)
|
||||
|
||||
raise Return(launched.id)
|
||||
|
||||
@coroutine
|
||||
|
|
Reference in a new issue