consul icon indicating copy to clipboard operation
consul copied to clipboard

upstreamconfig in services-defaults not applied in update if not provided initially

Open fredwangwang opened this issue 2 years ago • 1 comments

Overview of the Issue

Adding UpstreamConfig to services-defaults does not have any effect if the services-defaults does not has UpstreamConfig initially.

Reproduction Steps

job file taken from: https://developer.hashicorp.com/nomad/tutorials/integrate-consul/consul-service-mesh

  1. apply the following service defaults
Kind = "service-defaults"
Name = "count-dashboard"
Protocol = "http"

// UpstreamConfig = {
  // Defaults = {
    // Limits = {
    //   MaxConnections        = 512
    //   MaxPendingRequests    = 512
    //   MaxConcurrentRequests = 512
    // }
    // PassiveHealthCheck = {
    //   MaxFailures = 12345
    // }
  // }
// }
  1. apply the intention and deploy the nomad job as-is from the above link
  2. uncomment the commented limit and passive health check, reapply the service-defaults

expecting to see the maxfailures getting applied in outlier detection in envoy, however nothing happens:

image

tried to stop alloc, restart alloc, restart consul server, restart consul agent. None worked. Feels like there is some issue with the syncing of the configs (nil -> exist)

If I rename the service name to count-dashboard123 (a new name) and apply the service-defaults with upstreamconfig populated from get-go, the outlier detection is applied correctly. And subsequent update to the numbers (e.g. MaxFailures = 12345 --> 23456) is reflected immediately in envoy without needing to restart anything.

Consul info for both Client and Server

1.13.7

fredwangwang avatar Apr 25 '23 18:04 fredwangwang

Are you still having this issue? I've tried this on Consul v1.19.2 and can't replicate, adding either Default or Override PassiveHealthCheck configurations to an existing service defaults works.

nickwales avatar Oct 02 '24 23:10 nickwales