Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:use-snap-architecture-21.04 into ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:0.21-21.04
Proposed by
Sergio Durigan Junior
Status: | Merged |
---|---|
Merged at revision: | df6728bf51fa7d40ab45adf463cdc932dab9ff26 |
Proposed branch: | ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:use-snap-architecture-21.04 |
Merge into: | ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:0.21-21.04 |
Diff against target: |
12 lines (+1/-1) 1 file modified
Dockerfile (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Athos Ribeiro | Approve | ||
Bryce Harrington | Pending | ||
Canonical Server | Pending | ||
Review via email: mp+403986@code.launchpad.net |
Description of the change
This MP fixes a problem that is affecting snap-based images.
Because we don't explicitly specify an architecture when querying snapcraft for the snap download URL, we end up always getting the amd64 snap, even on non-amd64 architectures. This means that that we install amd64 binaries in the non-amd64 OCI images, which end up making them unusable.
The fix here is to specify the architecture by setting the X-Ubuntu-
I tested this on a ppc64el machine and it works.
To post a comment you must log in.
Hi Sergio,
Thanks for the MP!
Looks good to me.
I tested it by running the changed curl command locally in an x86_64 machine and verifying the snap file, which is as expected. Then, I substituted the introduced dpkg command for different architectures to make sure the contents of the snap contain binaries for the requested architectures.
For instance (s90x):
$ file bin/alertmanager alertmanager: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, Go BuildID= Li3q76PL8Nz7l2T uPIhI/LCp2e7c9c caiwizuBy2k/ 8SgumMYUWSkk59- xU5IX/fuPcO5vH5 LUSM51o3oq6, not stripped
prom/bin/