Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix(controller): add retry on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Oct 8, 2014
1 parent 3eb39c0 commit f81c766
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controller/scheduler/coreos.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,13 @@ def destroy(self, name):
self._wait_for_destroy(name)

def _destroy_container(self, name):
return self._delete_unit(name)
for attempt in range(RETRIES):
try:
self._delete_unit(name)
break
except:
if attempt == (RETRIES - 1): # account for 0 indexing
raise

def run(self, name, image, entrypoint, command): # noqa
"""Run a one-off command"""
Expand Down

0 comments on commit f81c766

Please sign in to comment.