appc / docker2aci

library and CLI tool to convert Docker images to ACIs (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
186 stars 60 forks source link

lib: wrong arch label values on non-amd64 architectures #195

Closed onlyjob closed 7 years ago

onlyjob commented 8 years ago

docker2aci FTBFS on multiple architectures in Debian, all due to "bad arch" in TestFetchingMultipleLayersV22:

i686 (x86_32):

--- FAIL: TestFetchingMultipleLayersV22 (0.00s)
    server.go:16: path requested: /v2
    server.go:16: path requested: /v2/docker2aci/dockerv22test/manifests/v0.1.0
    server.go:16: path requested: /v2/docker2aci/dockerv22test/blobs/sha256:e1d3a8cbfefdfa9cae6933f464edd653140cfdef3188e71a23ae5bea6e3acf2c
    server.go:16: path requested: /v2/docker2aci/dockerv22test/blobs/sha256:23929dd118cf976d950e8e89117b5a62908550140803df4feccc24fc26d173b7
    server.go:16: path requested: /v2/docker2aci/dockerv22test/blobs/sha256:44a6f6185deced11e94e69e55352f1fbc5346e5c9bf95f3017ca37d8b064db9c
    v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "386" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])
FAIL

arm64:

--- FAIL: TestFetchingMultipleLayersV22 (0.02s)
    server.go:16: path requested: /v2
    server.go:16: path requested: /v2/docker2aci/dockerv22test/manifests/v0.1.0
    server.go:16: path requested: /v2/docker2aci/dockerv22test/blobs/sha256:d43552b26516a1c2ce5e54828b7181667ff0eb6e43f78c9ecdd1176c4608a748
    server.go:16: path requested: /v2/docker2aci/dockerv22test/blobs/sha256:ac45c31629f1ded51db473f6669a9a602075ccb397fe166900a451d36a00e2bc
    server.go:16: path requested: /v2/docker2aci/dockerv22test/blobs/sha256:7e5fefe0ff9c239c096c86c7406631a3f43aee418d15508be279908987af272a
    v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "arm64" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])

armel:

v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "arm" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])

armhf:

v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "arm" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])

ppc64el:

v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "ppc64le" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])

s390x:

v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "s390x" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])

ppc64:

v22_test.go:326: error generating ACI: error writing manifest: json: error calling MarshalJSON for type schema.ImageManifest: json: error calling MarshalJSON for type types.Labels: bad arch "ppc64" for linux (must be one of: [amd64 i386 aarch64 aarch64_be armv6l armv7l armv7b])
lucab commented 8 years ago

Some of those arch have been added in recent appc/spec release and may be fixed just by bumping the vendored version to 0.8.7.

Some others instead requires a proper translation table from GOARCH to the appc label, as the mapping between those entities is not transparent.

onlyjob commented 8 years ago

Apparently appc-spec v0.8.8 did not help much as docker2aci v0.14.0 still massively FTBFS even on i386) (a.k.a. _x8632): https://buildd.debian.org/status/package.php?p=golang-github-appc-docker2aci

djtm commented 8 years ago

This also prevents proper conversion between platforms: https://github.com/appc/docker2aci/issues/145 (closed, not fixed)

lucab commented 8 years ago

All the bits are there, but this still needs the last bunch of fixes. Namely bumping appc/spec to 0.8.9, fixing conversion routines to start using helpers from https://github.com/appc/spec/pull/668 and adjusting tests accordingly.

lucab commented 7 years ago

Fixed via https://github.com/appc/docker2aci/issues/234, closing.