Skip to content

Commit

Permalink
fix(region): not change container exited status to net_failed (#21923)
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi authored Jan 7, 2025
1 parent 4931aaa commit c07c99e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/compute/models/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ func (c *SContainer) GetReleasedDevices(ctx context.Context, userCred mcclient.T

func (c *SContainer) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ContainerPerformStatusInput) (jsonutils.JSONObject, error) {
if api.ContainerExitedStatus.Has(c.GetStatus()) {
if input.Status == api.CONTAINER_STATUS_PROBE_FAILED {
if sets.NewString(api.CONTAINER_STATUS_PROBE_FAILED, api.CONTAINER_STATUS_NET_FAILED).Has(input.Status) {
return nil, httperrors.NewInputParameterError("can't set container status to %s when %s", input.Status, c.Status)
}
}
Expand Down

0 comments on commit c07c99e

Please sign in to comment.