Skip to content

Commit 3e1a58b

Browse files
committed
Removed potentially duplicated logs updated warning-type logs
1 parent 192450b commit 3e1a58b

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

pkg/controller/queuejob/queuejob_controller_ex.go

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,6 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
11051105
klog.V(3).Infof("[ScheduleNext] Cannot pop QueueJob from qjqueue! err=%#v", retryErr)
11061106
return err
11071107
}
1108-
klog.V(3).Infof("[ScheduleNext] activeQ.Pop_afterPriorityUpdate %s/%s *Delay=%.6f seconds RemainingLength=%d", qj.Namespace, qj.Name, time.Now().Sub(qj.Status.ControllerFirstTimestamp.Time).Seconds(), qjm.qjqueue.Length())
11091108
klog.V(4).Infof("[ScheduleNext] activeQ.Pop_afterPriorityUpdate %s/%s *Delay=%.6f seconds RemainingLength=%d Version=%s Status=%+v", qj.Namespace, qj.Name, time.Now().Sub(qj.Status.ControllerFirstTimestamp.Time).Seconds(), qjm.qjqueue.Length(), qj.ResourceVersion, qj.Status)
11101109
apiCacheAWJob, retryErr := qjm.getAppWrapper(qj.Namespace, qj.Name, "[ScheduleNext] -- after dynamic priority pop")
11111110
if retryErr != nil {
@@ -1116,7 +1115,6 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
11161115
return err
11171116
}
11181117
if apiCacheAWJob.Status.CanRun {
1119-
klog.V(3).Infof("[ScheduleNext] AppWrapper job: %s/%s from API is already scheduled. Ignoring request", qj.Namespace, qj.Name)
11201118
klog.V(4).Infof("[ScheduleNext] AppWrapper job: %s/%s from API is already scheduled. Ignoring request: Status=%+v", qj.Namespace, qj.Name, qj.Status)
11211119
return nil
11221120
}
@@ -1142,10 +1140,8 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
11421140

11431141
klog.V(4).Infof("[ScheduleNext] after Pop qjqLength=%d qj %s/%s Version=%s activeQ=%t Unsched=%t Status=%v", qjm.qjqueue.Length(), qj.Namespace, qj.Name, qj.ResourceVersion, qjm.qjqueue.IfExistActiveQ(qj), qjm.qjqueue.IfExistUnschedulableQ(qj), qj.Status)
11441142
if qjm.isDispatcher {
1145-
klog.V(3).Infof("[ScheduleNext] [Dispatcher Mode] Attempting to dispatch next appwrapper: '%s/%s", qj.Namespace, qj.Name)
11461143
klog.V(4).Infof("[ScheduleNext] [Dispatcher Mode] Attempting to dispatch next appwrapper: '%s/%s Status=%v", qj.Namespace, qj.Name, qj.Status)
11471144
} else {
1148-
klog.V(3).Infof("[ScheduleNext] [Agent Mode] Attempting to dispatch next appwrapper: '%s/%s'", qj.Namespace, qj.Name)
11491145
klog.V(4).Infof("[ScheduleNext] [Agent Mode] Attempting to dispatch next appwrapper: '%s/%s' Status=%v", qj.Namespace, qj.Name, qj.Status)
11501146
}
11511147

@@ -1283,16 +1279,14 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
12831279
klog.Info("%s %s %s", quotaFits, preemptAWs, msg)
12841280

12851281
if quotaFits {
1286-
klog.V(3).Infof("[ScheduleNext] [Agent mode] quota evaluation successful for app wrapper '%s/%s'", qj.Namespace, qj.Name)
12871282
klog.V(4).Infof("[ScheduleNext] [Agent mode] quota evaluation successful for app wrapper '%s/%s' activeQ=%t Unsched=%t Version=%s Status=%+v",
12881283
qj.Namespace, qj.Name, time.Now().Sub(HOLStartTime), qjm.qjqueue.IfExistActiveQ(qj), qjm.qjqueue.IfExistUnschedulableQ(qj), qj.ResourceVersion, qj.Status)
12891284
// Set any jobs that are marked for preemption
12901285
qjm.preemptAWJobs(ctx, preemptAWs)
12911286
} else { // Not enough free quota to dispatch appwrapper
12921287
dispatchFailedMessage = "Insufficient quota and/or resources to dispatch AppWrapper."
12931288
dispatchFailedReason = "quota limit exceeded"
1294-
klog.V(3).Infof("[ScheduleNext] [Agent Mode] Blocking dispatch for app wrapper '%s/%s' due to quota limits, msg=%s", qj.Namespace, qj.Name, msg)
1295-
klog.V(4).Infof("[ScheduleNext] [Agent Mode] Blocking dispatch for app wrapper '%s/%s' due to quota limits, activeQ=%t Unsched=%t Version=%s Status=%+v msg=%s",
1289+
klog.Infof("[ScheduleNext] [Agent Mode] Blocking dispatch for app wrapper '%s/%s' due to quota limits, activeQ=%t Unsched=%t Version=%s Status=%+v msg=%s",
12961290
qj.Namespace, qj.Name, time.Now().Sub(HOLStartTime), qjm.qjqueue.IfExistActiveQ(qj), qjm.qjqueue.IfExistUnschedulableQ(qj), qj.ResourceVersion, qj.Status, msg)
12971291
// Call update etcd here to retrigger AW execution for failed quota
12981292
// TODO: quota management tests fail if this is converted into go-routine, need to inspect why?
@@ -1311,15 +1305,12 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
13111305

13121306
if aggqj.LessEqual(resources) { // Check if enough resources to dispatch
13131307
fits = true
1314-
klog.V(3).Infof("[ScheduleNext] [Agent Mode] available resource successful check for '%s/%s'", qj.Namespace, qj.Name)
13151308
klog.V(4).Infof("[ScheduleNext] [Agent Mode] available resource successful check for '%s/%s' at %s activeQ=%t Unsched=%t Version=%s Status=%+v.",
13161309
qj.Namespace, qj.Name, time.Now().Sub(HOLStartTime), qjm.qjqueue.IfExistActiveQ(qj), qjm.qjqueue.IfExistUnschedulableQ(qj), qj.ResourceVersion, qj.Status)
13171310
} else { // Not enough free resources to dispatch HOL
13181311
fits = false
13191312
dispatchFailedMessage = "Insufficient resources to dispatch AppWrapper."
1320-
klog.V(3).Infof("[ScheduleNext] [Agent Mode] Failed to dispatch app wrapper '%s/%s' due to insufficient resources",
1321-
qj.Namespace, qj.Name)
1322-
klog.V(4).Infof("[ScheduleNext] [Agent Mode] Failed to dispatch app wrapper '%s/%s' due to insufficient resources, activeQ=%t Unsched=%t Version=%s Status=%+v",
1313+
klog.Infof("[ScheduleNext] [Agent Mode] Failed to dispatch app wrapper '%s/%s' due to insufficient resources, activeQ=%t Unsched=%t Version=%s Status=%+v",
13231314
qj.Namespace, qj.Name, qjm.qjqueue.IfExistActiveQ(qj),
13241315
qjm.qjqueue.IfExistUnschedulableQ(qj), qj.ResourceVersion, qj.Status)
13251316
// TODO: Remove forwarded logic as a big AW will never be forwarded
@@ -1383,9 +1374,7 @@ func (qjm *XController) ScheduleNext(qj *arbv1.AppWrapper) {
13831374
fowardingLoopCount += 1
13841375
}
13851376
if !forwarded { // start thread to backoff
1386-
klog.V(3).Infof("[ScheduleNext] [Agent Mode] backing off app wrapper '%s/%s' after waiting for %s",
1387-
qj.Namespace, qj.Name, time.Now().Sub(HOLStartTime))
1388-
klog.V(4).Infof("[ScheduleNext] [Agent Mode] backing off app wrapper '%s/%s' after waiting for %s activeQ=%t Unsched=%t Version=%s Status=%+v",
1377+
klog.Infof("[ScheduleNext] [Agent Mode] backing off app wrapper '%s/%s' after waiting for %s activeQ=%t Unsched=%t Version=%s Status=%+v",
13891378
qj.Namespace, qj.Name, time.Now().Sub(HOLStartTime), qjm.qjqueue.IfExistActiveQ(qj), qjm.qjqueue.IfExistUnschedulableQ(qj), qj.ResourceVersion, qj.Status)
13901379
if qjm.quotaManager != nil && quotaFits {
13911380
qjm.quotaManager.Release(qj)
@@ -1524,8 +1513,6 @@ func (qjm *XController) backoff(ctx context.Context, q *arbv1.AppWrapper, reason
15241513
klog.Errorf("[backoff] Failed to update status for %s/%s. Continuing with possible stale object without updating conditions. err=%s", q.Namespace, q.Name, err)
15251514
}
15261515
qjm.qjqueue.AddUnschedulableIfNotPresent(q)
1527-
klog.V(3).Infof("[backoff] %s/%s move to unschedulableQ before sleep for %d seconds. Unsched=%t", q.Namespace, q.Name,
1528-
qjm.config.BackoffTimeOrDefault(defaultBackoffTime), qjm.qjqueue.IfExistUnschedulableQ(q))
15291516
klog.V(4).Infof("[backoff] %s/%s move to unschedulableQ before sleep for %d seconds. activeQ=%t Unsched=%t Version=%s Status=%+v", q.Namespace, q.Name,
15301517
qjm.config.BackoffTimeOrDefault(defaultBackoffTime), qjm.qjqueue.IfExistActiveQ(q), qjm.qjqueue.IfExistUnschedulableQ(q), q.ResourceVersion, q.Status)
15311518
time.Sleep(time.Duration(qjm.config.BackoffTimeOrDefault(defaultBackoffTime)) * time.Second)
@@ -1634,8 +1621,6 @@ func (qjm *XController) UpdateQueueJobs(newjob *arbv1.AppWrapper) {
16341621
qjm.eventQueue.Delete(updateQj)
16351622
qjm.qjqueue.Delete(updateQj)
16361623
}
1637-
klog.V(3).Infof("[UpdateQueueJobs] Done getting completion status for app wrapper '%s/%s' Status.CanRun=%t Status.State=%s", newjob.Namespace, newjob.Name,
1638-
newjob.Status.CanRun, newjob.Status.State)
16391624
klog.V(4).Infof("[UpdateQueueJobs] Done getting completion status for app wrapper '%s/%s' Version=%s Status.CanRun=%t Status.State=%s, pod counts [Pending: %d, Running: %d, Succeded: %d, Failed %d]", newjob.Namespace, newjob.Name, newjob.ResourceVersion,
16401625
newjob.Status.CanRun, newjob.Status.State, newjob.Status.Pending, newjob.Status.Running, newjob.Status.Succeeded, newjob.Status.Failed)
16411626
}
@@ -1886,7 +1871,7 @@ func (cc *XController) agentEventQueueWorker() {
18861871

18871872
return nil
18881873
}
1889-
klog.V(3).Infof("[Controller: Dispatcher Mode] XQJ Status Update from AGENT: Name:%s, Namespace:%s, Status: %+v\n", queuejob.Name, queuejob.Namespace, queuejob.Status)
1874+
klog.V(4).Infof("[Controller: Dispatcher Mode] XQJ Status Update from AGENT: Name:%s, Namespace:%s, Status: %+v\n", queuejob.Name, queuejob.Namespace, queuejob.Status)
18901875

18911876
// sync AppWrapper
18921877
if err := cc.updateQueueJobStatus(ctx, queuejob); err != nil {
@@ -2207,7 +2192,6 @@ func (cc *XController) manageQueueJob(ctx context.Context, qj *arbv1.AppWrapper,
22072192
}
22082193
return nil
22092194
} else if qj.Status.CanRun && qj.Status.State == arbv1.AppWrapperStateActive {
2210-
klog.V(3).Infof("[manageQueueJob] Getting completion status for app wrapper '%s/%s' Status.CanRun=%t Status.State=%s", qj.Namespace, qj.Name, qj.Status.CanRun, qj.Status.State)
22112195
klog.V(4).Infof("[manageQueueJob] Getting completion status for app wrapper '%s/%s' Version=%s Status.CanRun=%t Status.State=%s, pod counts [Pending: %d, Running: %d, Succeded: %d, Failed %d]", qj.Namespace, qj.Name, qj.ResourceVersion,
22122196
qj.Status.CanRun, qj.Status.State, qj.Status.Pending, qj.Status.Running, qj.Status.Succeeded, qj.Status.Failed)
22132197

0 commit comments

Comments
 (0)