hashicorp / hashicorp/consul

Failed to correctly represent intentions in Consul UI

Open
#14,795 4 comments 0 reactions 0 assignees View on GitHub
theme/ui type/bug
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Overview of the Issue

The Consul UI has a problem for representing correctly the intention rules in the topology field of a service. I have correctly defined the intention but the UI doesn't handle it even if I create the rule after a click on the red arrow. The intention works correctly on the network.

![Capture d’écran du 2022-09-29 10-56-20](https://user-images.githubusercontent.com/32083095/192989901-11c171e2-1650-4a35-8e74-7c47818b79a8.png)
![Capture d’écran du 2022-09-29 10-57-00](https://user-images.githubusercontent.com/32083095/192989924-cf988659-cb35-4f35-a24a-83233db4d479.png)
![Capture d’écran du 2022-09-29 10-57-32](https://user-images.githubusercontent.com/32083095/192989932-aab858af-cde9-4e4c-9add-0b39f4c3af91.png)

All services are in a Mesh Network with Envoy sidecar except traefik that is in native mode. Traefik is integrated in the Mesh network.

#### Reproduction Steps

### Consul info for both Client and Server
```

job "traefik" {
datacenters = ["MicroservicePlatform"]

group "traefik" {

network {
mode = "bridge"

port "http" {
static = 80
to = 80
}

port "https" {
static = 443
to = 443
}

port "gui" {
static = 8081
to = 8081
}
}

service {
name = "traefik"
port = "http"
tags = ["http"]

connect {
native = true
}
}

service {
name = "traefik"
port = "https"
tags = ["https"]
}

service {
name = "traefik"
port = "gui"
tags = ["gui"]
}

task "traefik" {
driver = "docker"
config {
image = "traefik:latest"
args = [
"--providers.consulcatalog.connectaware=true",
"--providers.consulcatalog.connectbydefault=true",
"--providers.consulcatalog.exposedbydefault=false",
"--entrypoints.http=true",
"--entrypoints.http.address=:80",
"--entrypoints.https=true",
"--entrypoints.https.address=:443",
"--api.dashboard=true",
"--entrypoints.traefik.address=:8081",
"--api.insecure=true",
"--providers.consulcatalog.servicename=traefik",
"--providers.consulcatalog.prefix=traefik",
"--metrics.prometheus=true"
]
}
}
}
}
```

Consul master

```
datacenter = "MicroservicePlatform"
data_dir = "/opt/consul"

bind_addr = "X.X.X.X"
client_addr = "0.0.0.0"
bootstrap_expect = 1

ports {
http = 8006
grpc = 8502
}

connect {
enabled = true
}

server = true

retry_join = ["X.X.X.X"]

performance {
raft_multiplier = 1
}

telemetry {
prometheus_retention_time = "24h"
disable_hostname = true
}

ui_config {
enabled = true
metrics_provider = "prometheus"
metrics_proxy {
base_url = "http://X.X.X.X:9090"
}
}
```

Consul agent
```
datacenter = "MicroservicePlatform"
data_dir = "/opt/consul"

bind_addr = "X.X.X.X"
client_addr = "0.0.0.0"

ui = false

retry_join = ["X.X.X.X"]

performance {
raft_multiplier = 1
}

ports {
grpc = 8502
}

connect {
enabled = true
}

telemetry {
prometheus_retention_time = "480h",
disable_hostname = true
}
```
```

job "homepage" {
datacenters = ["MicroservicePlatform"]

group "front" {
network {
mode = "bridge"
port "envoy_metrics" {
to = 8888
}
}

service {
meta {
envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}"
}
name = "homepage"
port = 3000

tags = [
"traefik.enable=true",
"traefik.http.routers.homepage.rule=Host(`XXX`)"
]
connect {
sidecar_service {
proxy {
config {
envoy_prometheus_bind_addr = "0.0.0.0:8888"
}
}
}
}
}

task "frontend" {
driver = "docker"
config {
image = "X.X.X.X/home_page"
}
}
}
}
```

### Operating system and Environment details

Debian 11
Consul v1.13.2
Nomad v1.3.1

### Log Fragments

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the Consul UI topology view with the provided Consul, Nomad, Traefik, and intention configuration; done means the UI correctly represents the defined intention rules while the network behavior remains functional.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.