Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added clusterDecision to appwrappers crd
  • Loading branch information
Jaroslaw Cwiklik committed Sep 19, 2023
commit c192f7ef5620790a335cf40742442f9f7b3d371b
27 changes: 27 additions & 0 deletions config/crd/bases/mcad.ibm.com_appwrappers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,33 @@ spec:
are ANDed.
type: object
type: object
policyResult:
properties:
policySource:
items:
properties:
lastUpdateMicroTime:
description: The latest time this condition was updated.
format: date-time
type: string
message:
description: A human readable message indicating details
about the cluster decision.
type: string
name:
description: ID/Name of the policy decision maker. Most
often this will be MCAD but design can support alternatives
type: string
type: object
type: array
targetCluster:
properties:
name:
type: string
required:
- name
type: object
type: object
type: object
dispatchDuration:
description: Wall clock duration time of appwrapper in seconds
Expand Down
27 changes: 27 additions & 0 deletions deployment/mcad-controller/crds/mcad.ibm.com_appwrappers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,33 @@ spec:
are ANDed.
type: object
type: object
policyResult:
properties:
policySource:
items:
properties:
lastUpdateMicroTime:
description: The latest time this condition was updated.
format: date-time
type: string
message:
description: A human readable message indicating details
about the cluster decision.
type: string
name:
description: ID/Name of the policy decision maker. Most
often this will be MCAD but design can support alternatives
type: string
type: object
type: array
targetCluster:
properties:
name:
type: string
required:
- name
type: object
type: object
type: object
dispatchDuration:
description: Wall clock duration time of appwrapper in seconds
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,8 @@ func (cc *XController) manageQueueJob(qj *arbv1.AppWrapper, podPhaseChanges bool
return nil
}

if qj.Status.CanRun && !qj.Status.IsDispatched { //&& qj.Status.State != arbv1.AppWrapperStateCompleted {
if qj.Status.CanRun && !qj.Status.IsDispatched {

if klog.V(10).Enabled() {
current_time := time.Now()
klog.V(10).Infof("[worker-manageQJ] XQJ %s has Overhead Before Dispatching: %s", qj.Name, current_time.Sub(qj.CreationTimestamp.Time))
Expand Down Expand Up @@ -2294,15 +2295,14 @@ func (cc *XController) manageQueueJob(qj *arbv1.AppWrapper, podPhaseChanges bool
klog.V(10).Infof("[Dispatcher Controller] XQJ %s has Overhead After Dispatching: %s", qj.Name, current_time.Sub(qj.CreationTimestamp.Time))
klog.V(10).Infof("[TTime] %s, %s: WorkerAfterDispatch", qj.Name, time.Now().Sub(qj.CreationTimestamp.Time))
}

if _, err := cc.arbclients.ArbV1().AppWrappers(qj.Namespace).Update(qj); err != nil {
klog.Errorf("Failed to update status of AppWrapper %v/%v: %v",
qj.Namespace, qj.Name, err)
return err
}
klog.V(10).Infof("[Dispatcher Controller] Update Successfull - AppWrapper %s .", qj.Name)
klog.V(10).Infof("[Dispatcher Controller] Update Successfull - AppWrapper %s .", qj.Name)
}

}
return err
}
Expand Down