-
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
Consul WebUI have issues when loading both ARM64 and AMD64 bundle #20981
Comments
Hi @nwmqpa, I was able to reproduce this using a mixed architecture environment in running in Docker. # docker-compose.yaml
---
version: "3.8"
services:
consul_amd64:
# hashicorp/consul:1.18.1
# OS/ARCH: linux/amd64
image: hashicorp/consul@sha256:7fce167b0d99d1b2b1288d8dec0ef4dd7d787b6f136c8d6bc59fee077b055734
platform: linux/amd64
environment:
CONSUL_BIND_INTERFACE: eth0
labels:
traefik.enable: true
traefik.http.services.consul.loadbalancer.server.port: 8500
consul_arm64:
# hashicorp/consul:1.18.1
# OS/ARCH: linux/arm64
image: hashicorp/consul@sha256:d094ee4455ebe0fcd33cd0de6dd02f8ba6e79ae3406ad5acb341b3cf62fcceda
platform: linux/arm64
depends_on:
- consul_amd64
environment:
CONSUL_BIND_INTERFACE: eth0
CONSUL_LOCAL_CONFIG: |
{
"retry_join": ["consul"],
"server": false
}
labels:
traefik.enable: true
traefik.http.services.consul.loadbalancer.server.port: 8500
links:
- consul_amd64:consul
traefik:
image: traefik:v2.11.2
ports:
- "8000:8000/tcp"
- "8080:8080/tcp"
environment:
TRAEFIK_ACCESSLOG: 'true'
TRAEFIK_API_INSECURE: 'true'
TRAEFIK_PROVIDERS_DOCKER: 'true'
TRAEFIK_ENTRYPOINTS_web: 'true'
TRAEFIK_ENTRYPOINTS_web_ADDRESS: ":8000"
labels:
traefik.http.routers.consul.rule: PathPrefix(`/`)
traefik.http.routers.consul.entrypoints: web
traefik.http.routers.consul.service: consul
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro After running The issue is that a few of the assets have a unique content hash in the filename and these asset names differ across the supported OS and architecture specific builds of Consul for a given release. (Each curl request is being routed to a different server.) $ diff --unified <(curl http://localhost:8000/ui/ | grep '/ui/assets/chunk') <(curl http://localhost:8000/ui/ | grep '/ui/assets/chunk')
--- /dev/fd/11 2024-04-26 17:30:00
+++ /dev/fd/12 2024-04-26 17:30:00
@@ -1,3 +1,3 @@
-<link rel="stylesheet" href="/ui/assets/chunk.143.4a0b6b80ab1fa229e8ae.css"/>
+<link rel="stylesheet" href="/ui/assets/chunk.143.b1771c7664bb3778d56b.css"/>
<script src="/ui/assets/chunk.924.719761ac5e77d019056f.js"></script>
-<script src="/ui/assets/chunk.143.4a0b6b80ab1fa229e8ae.js"></script>
+<script src="/ui/assets/chunk.143.b1771c7664bb3778d56b.js"></script> The UI will fail to load if the asset being requested by the browser is not present on the backend server. A potential solution might be to modify the build workflow to build the UI once for a given release, and then use the same assets for all OS and architecture-specific builds, instead of building it for each OS/arch build as is done today. consul/.github/workflows/build.yml Lines 86 to 103 in 98cb473
consul/.github/workflows/build.yml Lines 116 to 128 in 98cb473
I'll mark this as a bug and work with our team to figure out the best path forward. |
Overview of the Issue
When having an autoscaling group that is configured to use both ARM64 and AMD64 nodes, consul WebUI can load bundles from different instances types, and this prevent the UI from loading correctly, as bundles are not named the same between architectures.
Reproduction Steps
Consul info for both Client and Server
Client info
Server info
Operating system and Environment details
Server 1:
OS: Amazon Linux 2023
Architecture: x86_64
Server 2:
OS: Amazon Linux 2023
Architecture: AMD64
Log Fragments
Not applicable
The text was updated successfully, but these errors were encountered: