Skip to content

Commit

Permalink
Merge pull request #4037 from MaxMcAdam/anax-4034
Browse files Browse the repository at this point in the history
Issue 4034 - Agreement never gets terminated even when policy no long…
  • Loading branch information
LiilyZhang committed Apr 11, 2024
2 parents 6acd19a + 935a384 commit fa20198
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions governance/governance.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ func (w *GovernanceWorker) governAgreements() {

// The proposal for this agreement is no longer compatible with the node's policy, so cancel the agreement.
glog.V(3).Infof(logString(fmt.Sprintf("current proposal for %v is out of policy: %v", ag.CurrentAgreementId, err)))
glog.V(3).Infof(logString(fmt.Sprintf("terminating agreement %v because it cannot be verified by the agreement bot.", ag.CurrentAgreementId)))
reason := w.producerPH[ag.AgreementProtocol].GetTerminationCode(producer.TERM_REASON_POLICY_CHANGED)
eventlog.LogAgreementEvent(w.db, persistence.SEVERITY_INFO,
persistence.NewMessageMeta(EL_GOV_START_TERM_AG_WITH_REASON, ag.RunningWorkload.URL, w.producerPH[ag.AgreementProtocol].GetTerminationReason(reason)),
persistence.EC_CANCEL_AGREEMENT, ag)
w.cancelGovernedAgreement(&ag, reason)

} else {
glog.V(5).Infof(logString(fmt.Sprintf("agreement %v is still in policy.", ag.CurrentAgreementId)))
Expand Down

0 comments on commit fa20198

Please sign in to comment.