diff --git a/client/client.go b/client/client.go index 2f053cb3d..5477971ed 100644 --- a/client/client.go +++ b/client/client.go @@ -1987,9 +1987,14 @@ func makeFailedAlloc(add *structs.Allocation, err error) *structs.Allocation { } failTime := time.Now() - stripped.DeploymentStatus = &structs.AllocDeploymentStatus{ - Healthy: helper.BoolToPtr(false), - Timestamp: failTime, + if add.DeploymentStatus.HasHealth() { + // Never change deployment health once it has been set + stripped.DeploymentStatus = add.DeploymentStatus.Copy() + } else { + stripped.DeploymentStatus = &structs.AllocDeploymentStatus{ + Healthy: helper.BoolToPtr(false), + Timestamp: failTime, + } } taskGroup := add.Job.LookupTaskGroup(add.TaskGroup)