mirror of
https://github.com/clearml/clearml-agent
synced 2025-04-26 00:49:11 +00:00
Fix agent can return non-zero error code and pods will end up restarting forever (issue #56)
This commit is contained in:
parent
82c5e55fe4
commit
537b67e0cd
@ -434,11 +434,12 @@ class K8sIntegration(Worker):
|
|||||||
script_encoded.encode('ascii')
|
script_encoded.encode('ascii')
|
||||||
).decode('ascii'))
|
).decode('ascii'))
|
||||||
|
|
||||||
|
# Notice: we always leave with exit code 0, so pods are never restarted
|
||||||
container = self._merge_containers(
|
container = self._merge_containers(
|
||||||
container,
|
container,
|
||||||
dict(name=name, image=docker_image,
|
dict(name=name, image=docker_image,
|
||||||
command=['/bin/bash'],
|
command=['/bin/bash'],
|
||||||
args=['-c', '{} ; {}'.format(create_clearml_conf, create_init_script)])
|
args=['-c', '{} ; {} ; exit 0'.format(create_clearml_conf, create_init_script)])
|
||||||
)
|
)
|
||||||
|
|
||||||
if template['spec']['containers']:
|
if template['spec']['containers']:
|
||||||
|
Loading…
Reference in New Issue
Block a user