You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a proxy upstream is added to a job of type = "system", the container is not restarted but the new configuration is not taken into account. The new upstream is unreachable from the container and we need to restart the job to make it work.
When the job type is set to service everything works as expected: the container is not restarted and the new upstream can be reached.
Reproduction steps
Run job api1
Run job api2 without upstream
Run job api2 with upstream to api1 (uncomment the upstream part of the following job)
Enter the job api2 container and try to curl api1: curl http://127.0.0.1:7777
Job file (if appropriate)
api1
job "api" {
datacenters = ["dc1"]
group "api1" {
count = 1
network {
mode ="bridge"
port "http" {
to = 8080
}
}
service {
name = "api1"
port = 8080
connect {
sidecar_service {}
}
check {
name = "alive"
port = "http"
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
task "api1" {
driver = "docker"
env {
PORT = 8080
NAME = "api1"
}
config {
image = "patatra/test-connections-server:latest"
}
}
}
}
api2
job "api2" {
datacenters = ["dc1"]
type = "system"
group "api2" {
network {
mode ="bridge"
port "http" {
to = 8081
}
}
service {
name = "api2"
port = 8081
check {
name = "alive"
port = "http"
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
connect {
sidecar_service {
proxy {
// upstreams {
// destination_name = "api1"
// local_bind_port = 7777
// }
}
}
}
}
task "api2" {
driver = "docker"
env {
PORT = 8081
NAME = "api2"
}
config {
image = "patatra/test-connections-server:latest"
}
}
}
}
The text was updated successfully, but these errors were encountered:
…eams are modified
This PR fixes a bug where modifying the upstreams of a Connect sidecar proxy
would not result Consul applying the changes, unless an additional change to
the job would trigger a task replacement (thus replacing the service definition).
The fix is to check if upstreams have been modified between Nomad's view of the
sidecar service definition, and the service definition for the sidecar that is
actually registered in Consul.
Fixes#8754
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad version
0.12.3
Issue
When a proxy upstream is added to a job of
type = "system"
, the container is not restarted but the new configuration is not taken into account. The new upstream is unreachable from the container and we need to restart the job to make it work.When the job type is set to
service
everything works as expected: the container is not restarted and the new upstream can be reached.Reproduction steps
api1
api2
without upstreamapi2
with upstream toapi1
(uncomment the upstream part of the following job)api2
container and try to curlapi1
:curl http://127.0.0.1:7777
Job file (if appropriate)
api1
api2
The text was updated successfully, but these errors were encountered: