fix(tiller): grpc call terminates prematurely
- enhance tiller install grpc timeout - enhance tiller update grpc timeout Closes #182 Change-Id: I98d6246f8a09ce3b805cbad18122e269472a1b34
This commit is contained in:
parent
5d75b448fd
commit
328592686f
@ -37,6 +37,7 @@ from armada.utils.release import label_selectors
|
||||
TILLER_PORT = 44134
|
||||
TILLER_VERSION = b'2.5.0'
|
||||
TILLER_TIMEOUT = 300
|
||||
GRPC_EPSILON = 60
|
||||
RELEASE_LIMIT = 64
|
||||
RUNTEST_SUCCESS = 9
|
||||
|
||||
@ -272,6 +273,9 @@ class Tiller(object):
|
||||
'''
|
||||
Update a Helm Release
|
||||
'''
|
||||
|
||||
rel_timeout = self.timeout if not timeout else timeout
|
||||
|
||||
LOG.debug("wait: %s", wait)
|
||||
LOG.debug("timeout: %s", timeout)
|
||||
|
||||
@ -296,7 +300,8 @@ class Tiller(object):
|
||||
timeout=timeout)
|
||||
|
||||
stub.UpdateRelease(
|
||||
release_request, self.timeout, metadata=self.metadata)
|
||||
release_request, rel_timeout + GRPC_EPSILON,
|
||||
metadata=self.metadata)
|
||||
except Exception:
|
||||
status = self.get_release_status(release)
|
||||
raise ex.ReleaseException(release, status, 'Upgrade')
|
||||
@ -312,6 +317,8 @@ class Tiller(object):
|
||||
Create a Helm Release
|
||||
'''
|
||||
|
||||
rel_timeout = self.timeout if not timeout else timeout
|
||||
|
||||
LOG.info("Wait: %s, Timeout: %s", wait, timeout)
|
||||
|
||||
if values is None:
|
||||
@ -332,8 +339,8 @@ class Tiller(object):
|
||||
timeout=timeout)
|
||||
|
||||
return stub.InstallRelease(
|
||||
release_request, self.timeout, metadata=self.metadata)
|
||||
|
||||
release_request, rel_timeout + GRPC_EPSILON,
|
||||
metadata=self.metadata)
|
||||
except Exception:
|
||||
status = self.get_release_status(release)
|
||||
raise ex.ReleaseException(release, status, 'Install')
|
||||
|
@ -46,5 +46,5 @@ class TillerTestCase(unittest.TestCase):
|
||||
)
|
||||
(mock_stub(tiller.channel).InstallRelease
|
||||
.assert_called_with(release_request,
|
||||
tiller.timeout,
|
||||
timeout + 60,
|
||||
metadata=tiller.metadata))
|
||||
|
Loading…
x
Reference in New Issue
Block a user