File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
pkg/apiserver/controller/queue Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323
2424 log "github.com/sirupsen/logrus"
2525 "gorm.io/gorm"
26+ k8serrors "k8s.io/apimachinery/pkg/api/errors"
2627 "volcano.sh/apis/pkg/apis/scheduling/v1beta1"
2728
2829 "github.com/PaddlePaddle/PaddleFlow/pkg/apiserver/common"
@@ -326,6 +327,15 @@ func CreateQueue(ctx *logger.RequestContext, request *CreateQueueRequest) (Creat
326327 }
327328
328329 err = runtimeSvc .CreateQueue (& queueInfo )
330+ if err != nil && k8serrors .IsAlreadyExists (err ) {
331+ _ , err = UpdateQueue (ctx , & UpdateQueueRequest {
332+ Name : request .Name ,
333+ Namespace : request .Namespace ,
334+ MaxResources : request .MaxResources ,
335+ MinResources : request .MinResources ,
336+ QuotaType : request .QuotaType ,
337+ })
338+ }
329339 if err != nil {
330340 ctx .Logging ().Errorf ("GlobalVCQueue create request failed. error:%s" , err .Error ())
331341 ctx .ErrorCode = common .QueueResourceNotMatch
You can’t perform that action at this time.
0 commit comments