diff --git a/src/backend/booster/server/pkg/manager/normal/keeper.go b/src/backend/booster/server/pkg/manager/normal/keeper.go index c201b220..cfa7ef24 100644 --- a/src/backend/booster/server/pkg/manager/normal/keeper.go +++ b/src/backend/booster/server/pkg/manager/normal/keeper.go @@ -187,7 +187,7 @@ func (k *keeper) checkTaskBasic(taskID string, wg *sync.WaitGroup) { } // 拉起资源超时,此时若有足够的资源,则先启动任务 - blog.Errorf("keeper: check and find task(%s) starting timeout(%s) since(%s), check if it can be running", + blog.Infof("keeper: check and find task(%s) starting timeout(%s) since(%s), check if it can be running", tb.ID, k.conf.KeepStartingTimeout.String(), tb.Status.LaunchTime.String()) if task.EnoughAvailableResource() { tb.Status.Ready() diff --git a/src/backend/booster/server/pkg/manager/normal/selector.go b/src/backend/booster/server/pkg/manager/normal/selector.go index e107bf9b..b5493b5c 100644 --- a/src/backend/booster/server/pkg/manager/normal/selector.go +++ b/src/backend/booster/server/pkg/manager/normal/selector.go @@ -161,9 +161,9 @@ func (s *selector) pick(egn engine.Engine, tqg *engine.TaskQueueGroup, queueName if err = egn.LaunchTask(tb, queueName); err != nil { if err != engine.ErrorNoEnoughResources { - blog.Errorf("selector: launch task(%s) from engine(%s) queue(%s) failed: %v", tb.ID, egn.Name(), queueName, err) + blog.Infof("selector: launch task(%s) from engine(%s) queue(%s) failed: %v", tb.ID, egn.Name(), queueName, err) } - blog.Errorf("selector: launch task(%s) from engine(%s) queue(%s) failed: %v", tb.ID, egn.Name(), queueName, err) + blog.Infof("selector: launch task(%s) from engine(%s) queue(%s) failed: %v", tb.ID, egn.Name(), queueName, err) return } diff --git a/src/backend/booster/server/pkg/manager/normal/tracker.go b/src/backend/booster/server/pkg/manager/normal/tracker.go index 48000ce0..d4ff4b2f 100644 --- a/src/backend/booster/server/pkg/manager/normal/tracker.go +++ b/src/backend/booster/server/pkg/manager/normal/tracker.go @@ -169,7 +169,7 @@ func (t *tracker) isFinishStarting(taskID string, egn engine.Engine) bool { ok, err := egn.LaunchDone(taskID) if err != nil { - blog.Errorf("tracker: check task(%s) launch done failed: %v", taskID, err) + blog.Infof("tracker: check task(%s) launch done failed: %v", taskID, err) return false } diff --git a/src/backend/booster/server/pkg/resource/crm/broker.go b/src/backend/booster/server/pkg/resource/crm/broker.go index 7474ae6c..752fbf93 100644 --- a/src/backend/booster/server/pkg/resource/crm/broker.go +++ b/src/backend/booster/server/pkg/resource/crm/broker.go @@ -359,7 +359,8 @@ func (b *Broker) launch() error { if availableInstance >= b.param.Instance { return b.param.Instance, nil } - + blog.Errorf("crm broker: failed to launch resource(%s) for broker(%s) with user(%s), need (%d) instances"+ + ", only (%d) available", brokerID, b.name, b.user, b.param.Instance, availableInstance) return 0, ErrorBrokerNotEnoughResources }, false) if err == ErrorBrokerNotEnoughResources { @@ -472,8 +473,9 @@ func (b *Broker) track(resourceID string, startTime time.Time) bool { } if !instanceok { - blog.Errorf("crm broker: track resource(%s) from broker(%s) with user(%s), not found expected %d instances, release it", - resourceID, b.name, b.user, b.param.Instance) + blog.Errorf("crm broker: track resource(%s) from broker(%s) with user(%s), not found "+ + "expected %d instances after %f seconds, release it", + resourceID, b.name, b.user, b.param.Instance, time.Since(startTime).Seconds()) // release this resource err = b.mgr.release(resource.resourceID, b.user) if err != nil { diff --git a/src/backend/booster/server/pkg/resource/crm/manager.go b/src/backend/booster/server/pkg/resource/crm/manager.go index 0f9e24f2..b44991e2 100644 --- a/src/backend/booster/server/pkg/resource/crm/manager.go +++ b/src/backend/booster/server/pkg/resource/crm/manager.go @@ -1042,10 +1042,15 @@ func (rm *resourceManager) checkBroker(broker *Broker) { for i := 0; i < delta; i++ { if err := broker.Launch(); err != nil { switch err { - case ErrorBrokerNotEnoughResources, ErrorBrokeringUnderCoolingTime: + case ErrorBrokerNotEnoughResources: blog.Errorf("crm: try launching resource for broker(%s) with user(%s) failed: %v", broker.name, broker.user, err) return + case ErrorBrokeringUnderCoolingTime: + blog.Warnf("crm: try launching resource for broker(%s) with user(%s) failed: %v", + broker.name, broker.user, err) + + return } blog.Errorf("crm: try launching resource for broker(%s) with user(%s) failed: %v", broker.name, broker.user, err)