Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:use-snap-architecture-20.04 into ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:0.21-20.04
Proposed by
Sergio Durigan Junior
Status: | Merged |
---|---|
Merged at revision: | 617b1de27b5afc1558280894ba049045f3661a28 |
Proposed branch: | ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:use-snap-architecture-20.04 |
Merge into: | ~ubuntu-docker-images/ubuntu-docker-images/+git/prometheus-alertmanager:0.21-20.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+403985@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:
$ file bin/alertmanager bin/alertmanage r: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID= DyDEAdWUjS4pFyS 2uFXp/- Q3Fx8cWg1LHK9GT StMV/Zmgt2vClLz n2t1ZqgeFO/ MmhUJ978VjaQZCl bMgDO, not stripped
parm64/