-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issue open-horizon#4156 - Bug: On restart, agbot doesn't update a nod… #4157
Conversation
agreementbot/agreementbot.go
Outdated
@@ -1119,6 +1122,51 @@ func (w *AgreementBotWorker) syncOnInit() error { | |||
glog.V(3).Infof(AWlogString(fmt.Sprintf("added agreement %v to policy agreement counter.", ag.CurrentAgreementId))) | |||
} | |||
|
|||
// After checking the pol userdev/bp_netspeed, add it in to a map. In Each for loop which iterate the agreements, checking if current policy inside agreement has been handled or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should remove the userdev/bp_netspeed comment
agreementbot/agreementbot.go
Outdated
glog.Errorf(fmt.Sprintf("Error trying to marshal internal business policy %v error: %v", exPolicy, err)) | ||
} else { | ||
// If business policy has been changed during a restart, handle it | ||
glog.V(3).Infof(AWlogString(fmt.Sprintf("policy(%v) in agreement %v has been changed", pol.Header.Name, ag.CurrentAgreementId))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this log message is correct... At this point, we don't know that the policy has been changed... we just want the agbot to re-evaluate the policy just in case it changed.
72f0838
to
c4aae65
Compare
agreementbot/agreementbot.go
Outdated
@@ -1142,6 +1179,11 @@ func (w *AgreementBotWorker) syncOnInit() error { | |||
} | |||
} | |||
|
|||
glog.V(3).Infof(AWlogString(fmt.Sprintf("discovered changed/deleted business policies: %v", bPolicyMessageMap))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not say "changed" policies in the log message.... Deleted is ok but maybe "policies that might have changed"
…e even though a new service was added and a deployment policy update occurred Signed-off-by: Le Zhang <zhangl@us.ibm.com>
c4aae65
to
f8c2500
Compare
Built and tested this in the all-in-one environment.. After restart, all the agents got the service update. |
…e even though a new service was added and a deployment policy update occurred
Pull Request Template
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Additional Context (Please include any Screenshots/gifs if relevant)
...
Checklist: