-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
agent: when enable_central_service_config is enabled ensure agent reload doesn't revert check state to critical #8747
Conversation
…oad doesn't revert check state to critical
} | ||
|
||
// addServiceLocked adds a service entry to the service manager if enabled, or directly | ||
// to the local state if it is not. This function assumes the state lock is already held. | ||
func (a *Agent) addServiceLocked(req *addServiceRequest, snap map[structs.CheckID]*structs.HealthCheck) error { | ||
func (a *Agent) addServiceLocked(req *addServiceRequest) error { | ||
req.fixupForAddServiceLocked() | ||
|
||
req.service.EnterpriseMeta.Normalize() |
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.
Below on the line just after if a.config.EnableCentralServiceConfig {
(that I can't comment on) is where req loses snap when we shunt this function call through service manager. The fix is to make sure snap is attached to req.
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.
🍒✅ Cherry pick of commit 7eef25d onto |
Likely introduced when #7345 landed.
The backport to 1.8.x is clean but the 1.7.x has conflicts in test code (#8748).