Skip to content
Prev Previous commit
Next Next commit
Added additional debugging.
Signed-off-by: Diana Arroyo <darroyo@us.ibm.com>
  • Loading branch information
dmatch01 committed Nov 14, 2020
commit be348f06c598a11deb516223a35e5fca4ed88666
18 changes: 10 additions & 8 deletions pkg/apis/controller/v1alpha1/appwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,16 @@ const (
type AppWrapperConditionType string

const (
AppWrapperCondInit AppWrapperConditionType = "Init"
AppWrapperCondQueueing AppWrapperConditionType = "Queueing"
AppWrapperCondHeadOfLine AppWrapperConditionType = "HeadOfLine"
AppWrapperCondBackoff AppWrapperConditionType = "Backoff"
AppWrapperCondDispatched AppWrapperConditionType = "Dispatched"
AppWrapperCondRunning AppWrapperConditionType = "Running"
AppWrapperCondDeleted AppWrapperConditionType = "Deleted"
AppWrapperCondFailed AppWrapperConditionType = "Failed"
AppWrapperCondInit AppWrapperConditionType = "Init"
AppWrapperCondQueueing AppWrapperConditionType = "Queueing"
AppWrapperCondHeadOfLine AppWrapperConditionType = "HeadOfLine"
AppWrapperCondBackoff AppWrapperConditionType = "Backoff"
AppWrapperCondDispatched AppWrapperConditionType = "Dispatched"
AppWrapperCondRunning AppWrapperConditionType = "Running"
AppWrapperCondPreemptCandidate AppWrapperConditionType = "PreemptCandidate"
AppWrapperCondPreempted AppWrapperConditionType = "Preempted"
AppWrapperCondDeleted AppWrapperConditionType = "Deleted"
AppWrapperCondFailed AppWrapperConditionType = "Failed"
)

// DeploymentCondition describes the state of a deployment at a certain point.
Expand Down
8 changes: 8 additions & 0 deletions pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ func (qjm *XController) PreemptQueueJobs() {
continue
}
newjob.Status.CanRun = false
if (q.Name == "aw-generic-deployment-2-030") {
glog.V(3).Infof("[PreemptQueueJobs] %s PreemptQueue &qj=%p Version=%s Status=%+v aw=%v", q.Name, q, q.ResourceVersion, q.Status, q)
glog.V(3).Infof("[PreemptQueueJobs] %s from cache &qj=%p Version=%s Status=%+v aw=%v", newjob.Name, newjob, newjob.ResourceVersion, newjob.Status, newjob)
}
message := fmt.Sprintf("Insufficient number of Running pods, minimum=%s, running=%s", string(newjob.Spec.SchedSpec.MinAvailable), string(newjob.Status.Running))
cond := GenerateAppWrapperCondition(arbv1.AppWrapperCondPreemptCandidate, v1.ConditionTrue, "MinPodsNotRunning", message)
newjob.Status.Conditions = append(newjob.Status.Conditions, cond)

if _, err := qjm.arbclients.ArbV1().AppWrappers(q.Namespace).Update(newjob); err != nil {
glog.Errorf("Failed to update status of AppWrapper %v/%v: %v",
q.Namespace, q.Name, err)
Expand Down