opentelemetry-demo icon indicating copy to clipboard operation
opentelemetry-demo copied to clipboard

FeatureFlagService fails to run on Mac M1 Pro

Open saurabhdes opened this issue 2 years ago • 2 comments

Bug Report

Which version of the demo you are using? (please provide either a specific Latest main or b6e75ee

Symptom

What is the expected behavior?

FeatureFlag UI loads on going to http://localhost:8081/ so we can turn on different feature flags

What is the actual behavior?

FeatureFlag UI http://localhost:8081/ doesn't load on Mac M1 Pro

Reproduce

  • On Mac M1 Pro , follow the getting started steps for Docker https://github.com/open-telemetry/opentelemetry-demo/blob/main/docs/docker_deployment.md , essentially, docker compose up --no-build
  • Wait about 5min for containers to start
  • Notice featureflag container shows it's running
  • Look at the logs of feature flag service, you will see qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault My understanding is qemu is the upstream component used for running Intel (amd64) containers on M1 (arm64)
  • Then go to http://localhost:8081/ and notice the page doesn't load as expected

Additional Context

My best guess is the image available for featureflag service ghcr.io/open-telemetry/demo:v0.4.0-alpha-featureflagservice does not support ARM architecture. The same issue exists for other services but somehow they do seem to run successfully on M1. refer below screenshot which shows a warning message on M1 for amd64 images. Screen Shot 2022-10-01 at 6 24 33 PM

I think we need to build multi-arch images for all services with buildx and then push them to ghcr.

saurabhdes avatar Oct 02 '22 01:10 saurabhdes

If you run docker compose up --build the image will be generated on your architecture and it will work. I went through this too and it's working.

janssenlima avatar Oct 09 '22 21:10 janssenlima

@janssenlima That's correct and I am aware of it as well. It's a good workaround until this issue is resolved by building multi arch images that get pushed to ghcr as part of build pipeline.

saurabhdes avatar Oct 09 '22 23:10 saurabhdes

This is resolved with @austinlparker's PR https://github.com/open-telemetry/opentelemetry-demo/pull/536

I built v1.0.0 on amd64 and this error occurs when running the image under emulation with Docker Desktop on apple silicon I applied the single line change (OTP v25->v23) then rebuilt on amd64 and the error does not occur on apple silicon.

joshleecreates avatar Nov 15 '22 03:11 joshleecreates

thanks @joshleecreates

cartersocha avatar Nov 20 '22 20:11 cartersocha

Yes, now on my Mac M1 Pro as well after running docker compose up --no-build i am able to see feature flag service running successfully.

image

saurabhdes avatar Nov 21 '22 01:11 saurabhdes