only record failures generated prior to stopping (#83)

This commit is contained in:
bmc-msft
2020-10-02 01:31:51 -04:00
committed by GitHub
parent a529f073a8
commit a196716e12
4 changed files with 29 additions and 16 deletions

View File

@ -740,12 +740,12 @@ class Scaleset(BASE_SCALESET, ORMMixin):
if task.state in [TaskState.stopping, TaskState.stopped]:
continue
task.error = Error(
code=ErrorCode.TASK_FAILED,
errors=["node reimaged during task execution"],
task.mark_failed(
Error(
code=ErrorCode.TASK_FAILED,
errors=["node reimaged during task execution"],
)
)
task.state = TaskState.stopping
task.save()
entry.delete()
if self.state == ScalesetState.shutdown: