From c07c99e08dbf9f7e809aab78cde12ba3f65ce348 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Tue, 7 Jan 2025 20:43:28 +0800 Subject: [PATCH] fix(region): not change container exited status to net_failed (#21923) --- pkg/compute/models/containers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compute/models/containers.go b/pkg/compute/models/containers.go index 90b3ef6a938..ae78e933a84 100644 --- a/pkg/compute/models/containers.go +++ b/pkg/compute/models/containers.go @@ -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) } }