Fix decreased setup timeout on ephemeral build manager
This commit is contained in:
parent
53e22b4afb
commit
428a7cb435
1 changed files with 6 additions and 1 deletions
|
@ -28,6 +28,7 @@ ETCD_MAX_WATCH_TIMEOUT = 30
|
|||
RETRY_IMMEDIATELY_TIMEOUT = 0
|
||||
NO_WORKER_AVAILABLE_TIMEOUT = 10
|
||||
DEFAULT_EPHEMERAL_API_TIMEOUT = 20
|
||||
DEFAULT_EPHEMERAL_SETUP_TIMEOUT = 300
|
||||
|
||||
class EtcdAction(object):
|
||||
GET = 'get'
|
||||
|
@ -71,6 +72,7 @@ class EphemeralBuilderManager(BaseManager):
|
|||
self._etcd_job_prefix = None
|
||||
|
||||
self._ephemeral_api_timeout = DEFAULT_EPHEMERAL_API_TIMEOUT
|
||||
self._ephemeral_setup_timeout = DEFAULT_EPHEMERAL_SETUP_TIMEOUT
|
||||
|
||||
# The registered executors available for running jobs, in order.
|
||||
self._ordered_executors = []
|
||||
|
@ -322,6 +324,9 @@ class EphemeralBuilderManager(BaseManager):
|
|||
self._ephemeral_api_timeout = self._manager_config.get('API_TIMEOUT',
|
||||
DEFAULT_EPHEMERAL_API_TIMEOUT)
|
||||
|
||||
self._ephemeral_setup_timeout = self._manager_config.get('SETUP_TIMEOUT',
|
||||
DEFAULT_EPHEMERAL_SETUP_TIMEOUT)
|
||||
|
||||
# Load components for all realms currently known to the cluster
|
||||
async(self._register_existing_realms())
|
||||
|
||||
|
@ -388,7 +393,7 @@ class EphemeralBuilderManager(BaseManager):
|
|||
|
||||
try:
|
||||
yield From(self._etcd_client.write(job_key, lock_payload, prevExist=False,
|
||||
ttl=self._ephemeral_api_timeout))
|
||||
ttl=self._ephemeral_setup_timeout))
|
||||
except (KeyError, etcd.EtcdKeyError):
|
||||
# The job was already taken by someone else, we are probably a retry
|
||||
logger.error('Job: %s already exists in etcd, timeout may be misconfigured', build_uuid)
|
||||
|
|
Reference in a new issue