Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 4034 - Agreement never gets terminated even when policy no long… #4037

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
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
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
Loading