@@ -87,7 +87,7 @@ func (pc *podController) Deploy(cluster cluster.Cluster) {
8787 id , err := pc .createContainer (cluster , filters , i )
8888 if err != nil {
8989 log .Warnf ("%s Cannot create container, error=%q, spec=%+v" , pc , err , cSpec )
90- pc .pod .State = RunStateFail
90+ pc .pod .State = RunStateError
9191 pc .pod .LastError = fmt .Sprintf ("Cannot create container, %s" , err )
9292 return
9393 }
@@ -187,7 +187,7 @@ func (pc *podController) Stop(cluster cluster.Cluster) {
187187 for i , container := range pc .pod .Containers {
188188 if err := cluster .StopContainer (container .Id , pc .spec .GetKillTimeout ()); err != nil {
189189 log .Warnf ("%s Cannot stop the container %s, %s" , pc , container .Id , err )
190- pc .pod .State = RunStateFail
190+ pc .pod .State = RunStateError
191191 pc .pod .LastError = fmt .Sprintf ("Cannot stop container, %s" , err )
192192 } else {
193193 pc .refreshContainer (cluster , i )
@@ -212,7 +212,7 @@ func (pc *podController) Start(cluster cluster.Cluster) {
212212 pc .refreshContainer (cluster , i )
213213 } else {
214214 log .Warnf ("%s Cannot start the container %s, %s" , pc , container .Id , err )
215- pc .pod .State = RunStateFail
215+ pc .pod .State = RunStateError
216216 pc .pod .LastError = fmt .Sprintf ("Cannot start container, %s" , err )
217217 }
218218 }
@@ -231,7 +231,7 @@ func (pc *podController) Restart(cluster cluster.Cluster) {
231231 for i , container := range pc .pod .Containers {
232232 if err := cluster .RestartContainer (container .Id , pc .spec .GetKillTimeout ()); err != nil {
233233 log .Warnf ("%s Cannot restart the container %s, %s" , pc , container .Id , err )
234- pc .pod .State = RunStateFail
234+ pc .pod .State = RunStateError
235235 pc .pod .LastError = fmt .Sprintf ("Cannot restart container, %s" , err )
236236 } else {
237237 pc .refreshContainer (cluster , i )
@@ -285,7 +285,7 @@ func (pc *podController) startContainer(cluster cluster.Cluster, id string) erro
285285 log .Warnf ("%s Cannot release IP %s, %s" , pc , id , err )
286286 }
287287 }
288- pc .pod .State = RunStateFail
288+ pc .pod .State = RunStateError
289289 pc .pod .LastError = fmt .Sprintf ("Cannot start container, %s" , err )
290290 return err
291291 }
@@ -329,7 +329,7 @@ func (pc *podController) refreshContainer(kluster cluster.Cluster, index int) {
329329 pc .pod .LastError = fmt .Sprintf ("Missing container %q, %s" , id , err )
330330 } else {
331331 log .Warnf ("%s Failed to inspect container %s, %s" , pc , id , err )
332- pc .pod .State = RunStateFail
332+ pc .pod .State = RunStateError
333333 pc .pod .LastError = fmt .Sprintf ("Cannot inspect the container, %s" , err )
334334 }
335335 } else {
0 commit comments