-
Notifications
You must be signed in to change notification settings - Fork 616
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
17.06 won't deploy stack anymore. no suitable node (unsupported platform on 3 nodes) on armhf docker cluster #2294
Comments
probably introduced on 8edbb92 by @nishanttotla |
@trunet can you show the output for |
docker info is on the first comment. docker service inspect:
|
I see the issue. It seems like the node reports
but the image reports
and that causes scheduling to fail. We will need to add more normalization for architecture names. I'll do that but it would be useful to have a full list of architecture name variations. cc @thaJeztah @aaronlehmann currently we only do this for |
I can think of aarch64 armv7l, but they are completely different architecture, aarch64 is 64-bits, armv7l is 32-bits. also, check this: https://github.com/docker-library/official-images#architectures-other-than-amd64 |
@nishanttotla Is there a way to build the image with armv7l architecture instead of only arm, I didn't find anything on commit, push on build to add this? how docker hub is handling that, I suppose all https://hub.docker.com/r/arm32v7/ should uses armv7l? |
@trunet I'm not sure about that, but we'll see what's the best way to resolve this. Until then, you can get around this issue by using the |
@nicolaka as I'm using stack, I didn't find the --no-resolve-image equivalent on compose 3.3 reference. |
@nicolaka found it on https://docs.docker.com/engine/reference/commandline/stack_deploy/ thanks man |
@trunet apologies, yes for stacks you can use |
Is there a list of valid architectures in the image's data? (Same for nodes)? ARM is specifically tricky, as there's a lot of variations, and ways to express them ( If there's a list of valid values, we can decide to ignore other values |
Related: opencontainers/image-spec#661 @trunet I'm working on figuring out what the right fix is for this case. |
@tianon Do you know how |
@stevvooe that'd be I think way back in Docker's history, someone thought it'd be helpful to include "multiarch" metadata on images, and just threw in |
In the manifest list pushing code we've got (which again, as you know, isn't deployed to platform:
os: linux
architecture: arm
variant: v7 |
Ah, see moby/moby@f9359f5 for where those fields were first populated with |
@tianon The problem with For the vast number of cases, I think we can assume |
Indeed -- I'm 100% with you on To give another example that's completely broken, all the images under It's even conceivable to build Here's a more concrete example: $ manifest-tool inspect trollin/httpd:latest
Name: trollin/httpd:latest (Type: application/vnd.docker.distribution.manifest.list.v2+json)
Digest: sha256:6f43aac63ceb4fbfee6a724f3d8aeec4366bb83cd7ef37a9905ccf2256ba8557
* Contains 6 manifest references:
1 Mfst Type: application/vnd.docker.distribution.manifest.v2+json
1 Digest: sha256:8f58a3ef340038615498cead8b83fa3b31e4fe5c16961c6c3635e973ac9303ed
1 Mfst Length: 1780
1 Platform:
1 - OS: linux
1 - OS Vers:
1 - OS Feat: []
1 - Arch: amd64
1 - Variant:
1 - Feature:
1 # Layers: 7
layer 1: digest = sha256:9f0706ba7422412cd468804fee456786f88bed94bf9aea6dde2a47f770d19d27
layer 2: digest = sha256:47bacf36113fe830a77280f81a8203a228fa4bb4536f145a333709b9da0f7cf7
layer 3: digest = sha256:56798d8e5a3081371b84de38415c30c0f1ae034e4d57d82383c468a95521fc53
layer 4: digest = sha256:94b25413538ac04aa893f729c216553d9c86b0ea69318cfe903e16eb078492b7
layer 5: digest = sha256:97d879f4e260dd8d46a4eaf0c29f253a501fa82337840c30a6274de23227ab6e
layer 6: digest = sha256:2a4f7e960a3e3b32308101dec9c1525b961a242dca799737d2ad0c3e19350b42
layer 7: digest = sha256:12f5eb5312902eedee33d3b8d0f2abc7750f3ae7e32733b26547371f8eb6b034
2 Mfst Type: application/vnd.docker.distribution.manifest.v2+json
2 Digest: sha256:90fb0d45f7267ac96523f2030ab842d61c77c65999024b5f67771f599ae4bfa8
2 Mfst Length: 1780
2 Platform:
2 - OS: linux
2 - OS Vers:
2 - OS Feat: []
2 - Arch: arm
2 - Variant: v7
2 - Feature:
2 # Layers: 7
layer 1: digest = sha256:72c70f9f7d679945bc71d954dc0c7de236e0067af495d09e9bea24f497cc79b7
layer 2: digest = sha256:c3529be5f104abaa0a6777ce5aa3d62a14d637886a4eebc1fc8ed730c4009654
layer 3: digest = sha256:d8da62524d5de9ecb71f0046c66d3a291e6b2f81496a07d28e30b4e81f04ac51
layer 4: digest = sha256:7d7da9871d55dac5ea74a2b5f684f5c94bb5ca9b51ff5f2a81330facfcf67122
layer 5: digest = sha256:c2c771d498cd865c5dff06aa02340b0c859cebcbe6a88246c7e87e287ab70c48
layer 6: digest = sha256:de5a89172d87cbecee5e7924eb3c003458ad751d51e25eaed5d8a89912ef3ccb
layer 7: digest = sha256:a922909dfad204174854c24774fc54c9016d96d587480b6d40c0c56ae73612a7
3 Mfst Type: application/vnd.docker.distribution.manifest.v2+json
3 Digest: sha256:21920abf229fd278a820287cb8fbe9db206ecbbb4b5bd8a34aab0af8b9c0f470
3 Mfst Length: 1780
3 Platform:
3 - OS: linux
3 - OS Vers:
3 - OS Feat: []
3 - Arch: arm64
3 - Variant: v8
3 - Feature:
3 # Layers: 7
layer 1: digest = sha256:0dcb325d306f51780dbde5818f38ed8b0e8f478b56132f46bb5c30385f86eaa6
layer 2: digest = sha256:0a2d58b6ee283f9f76e8f06d3fac65e85b9e289df29ca44dc9314586e055cecc
layer 3: digest = sha256:eac331a2af3233030fcf1ad5300f9684767ebc08b8447e52b00783cb43de360a
layer 4: digest = sha256:b382ea768f87d2a04cac208183cd6ee2b487748fb7fe33a9f0e6c4ab0912a029
layer 5: digest = sha256:313fc6a3542b845ea9d51e727b1b0270de45d71e58a4cbd5e68c427761ce8107
layer 6: digest = sha256:1a9a6cd7e8894b6345a3d83a4cefba76609c8e096d5163a67c0dee33c7927ffb
layer 7: digest = sha256:26af40e76c32da3f9b7eac5f62d73ee6d51c30f0b257e37596da4bcbb7e34877
4 Mfst Type: application/vnd.docker.distribution.manifest.v2+json
4 Digest: sha256:261d6c4753982e203308fc5c637a74bdcd986a2edbab7d8aac39a391cae7a683
4 Mfst Length: 1780
4 Platform:
4 - OS: linux
4 - OS Vers:
4 - OS Feat: []
4 - Arch: 386
4 - Variant:
4 - Feature:
4 # Layers: 7
layer 1: digest = sha256:2fa359c89a0e952ec2fe14e3c584ee13d6ec919c73a7dcac34ba320a459e2a62
layer 2: digest = sha256:19378a3c2be7bef3f223e1ca4a0391c966e6330d8692ed17042471f25509713b
layer 3: digest = sha256:9e17073700efe44252f1c00a14cf28030458d929d0de85f4873189e23b218530
layer 4: digest = sha256:38c6ce3cfa9a4835b70425932f1da52dc06e8416369192b5b2fd0768956b907d
layer 5: digest = sha256:23815ae9a9b769433bf361d90f0654af265d56f7792633aaae368cc17d8af505
layer 6: digest = sha256:7951cc644f4c9b2aa30c2a8653ce4d2b7ac8390fb72dab2e6f5d3f522bbe738d
layer 7: digest = sha256:381d02ad82455287029be0a8cf1a1cae9915c26289bac3c24ed7636ba77c6795
5 Mfst Type: application/vnd.docker.distribution.manifest.v2+json
5 Digest: sha256:343ea34611a882700bf162ad929c42259446088d9933991addc64bc90af8f17e
5 Mfst Length: 1780
5 Platform:
5 - OS: linux
5 - OS Vers:
5 - OS Feat: []
5 - Arch: ppc64le
5 - Variant:
5 - Feature:
5 # Layers: 7
layer 1: digest = sha256:a5561821dba4ceb47be1d2f5f108a24b391df9d6a3a764d2c04ea8ac29410625
layer 2: digest = sha256:39c4390b614987e9576d36928eb4d12a6d5e160fb83b5095198efd400b6b8c5b
layer 3: digest = sha256:d14c381984db757a959e0f35eb170b4863f5c5e8570702bb7529f4f88998f73a
layer 4: digest = sha256:90d23acf5ff39880a4a787a1d41e6bc4b204a7e01fc2e60183892c20aa60c5c4
layer 5: digest = sha256:77e6d79cd73f74c4071006e03344deccab113906c139d8755461d4fd72604b1e
layer 6: digest = sha256:e3649c2d25a8bf9910fe5f9f940924ef00277ca9a003c5fcaaeb487f116def62
layer 7: digest = sha256:67e875c10908fb1f66c807700e155e51ccc053f596e93f0d0f1aff26240aa46f
6 Mfst Type: application/vnd.docker.distribution.manifest.v2+json
6 Digest: sha256:3c121d29d5f0c2bb4fdc54fa2e206bb9d6a4b751e29de571b4ef5af7b80c20f6
6 Mfst Length: 1780
6 Platform:
6 - OS: linux
6 - OS Vers:
6 - OS Feat: []
6 - Arch: s390x
6 - Variant:
6 - Feature:
6 # Layers: 7
layer 1: digest = sha256:29420dd727d39cbedfb85562111f49e24b0b96adda04de4663d2099fbbf4f993
layer 2: digest = sha256:0eb60e029192948c200dc12526bcb19c36747de3cedae3822c3009d6250b95b9
layer 3: digest = sha256:f2cee80bd07440bd13eb077947699252cbfba9b263af2a43bd94f31378a5c35c
layer 4: digest = sha256:b628a0b163be3123753102d5269918189e0ff4f2cecc25b8ebb685a7e292435e
layer 5: digest = sha256:9c67f623c538f560836daac0ea7ab1ffa883c09b87ae7b426fed7e4b828e466b
layer 6: digest = sha256:0bf51bf880e17e555e66c3af906cd603deae0af6095d1816ffb364b9d16e426d
layer 7: digest = sha256:16c1cb76b65df18dfffd6e1f23e843c3ddebd950f5e8ea24fd98be6c8b5997ad
(which was built by combining The info for $ manifest-tool inspect trollin/busybox:latest | grep -A7 'Platform:'
1 Platform:
1 - OS: linux
1 - OS Vers:
1 - OS Feat: []
1 - Arch: amd64
1 - Variant:
1 - Feature:
1 # Layers: 1
--
2 Platform:
2 - OS: linux
2 - OS Vers:
2 - OS Feat: []
2 - Arch: arm
2 - Variant: v5
2 - Feature:
2 # Layers: 1
--
3 Platform:
3 - OS: linux
3 - OS Vers:
3 - OS Feat: []
3 - Arch: arm
3 - Variant: v6
3 - Feature:
3 # Layers: 1
--
4 Platform:
4 - OS: linux
4 - OS Vers:
4 - OS Feat: []
4 - Arch: arm
4 - Variant: v7
4 - Feature:
4 # Layers: 1
--
5 Platform:
5 - OS: linux
5 - OS Vers:
5 - OS Feat: []
5 - Arch: arm64
5 - Variant: v8
5 - Feature:
5 # Layers: 1
--
6 Platform:
6 - OS: linux
6 - OS Vers:
6 - OS Feat: []
6 - Arch: 386
6 - Variant:
6 - Feature:
6 # Layers: 1
--
7 Platform:
7 - OS: linux
7 - OS Vers:
7 - OS Feat: []
7 - Arch: ppc64le
7 - Variant:
7 - Feature:
7 # Layers: 1
--
8 Platform:
8 - OS: linux
8 - OS Vers:
8 - OS Feat: []
8 - Arch: s390x
8 - Variant:
8 - Feature:
8 # Layers: 1 |
For building the individual architecture images, I'm not doing anything special or custom beyond |
For arm, I should have qualified. All other architectures have sufficient information. We'll either need this on the manifest or all the way down on the config (not sure if we really want to take that on). Seems, as is, there is no way to resolve the arm properties from the config itself and that the contents of Do we need to file a bug with OCI image-spec? |
@tianon ^ As far as a solution, I think we should remove the automatic constraint on architecture unless reporting on a multi-platform image. That will allow swarm to meet the image matching use case for windows/linux. |
I think that makes sense, especially since if it's not a manifest list, the notion of it being "multiarch" is kind of bogus anyhow (since the arch information is likely also bogus, or at least misleading). The As for filing a bug with the image-spec, I think that makes sense, but I didn't want to try and rock that boat pre-1.0 (since as shown by the commit I linked, it's a real old boat), and hadn't looked to see whether the image config itself was covered by the spec (but it makes sense for it to be). 😇 |
(I have to confess that I haven't tried building |
@tianon The image config is covered by the spec, unfortunately. For the cases where cross builds are happening, the image will have to be modified post-build. In the case where we just want to route a workload a host that can run that image, we likely don't have enough information, as that will have to be wrapped in a manifest list (index) to provide the actual platform information in the ARM case. |
I ran into the same issue today. I run a manager on amd64 and have a node which is armv6l. It's a raspberrypi model b+. I can run the image on the node itself, but when I want to run it as a swarm service it says: Btw. I also have two amd64 nodes. It seems it can't map the arm image on armv6l in the swarm scheduler. |
The Scaleway C1 machine shows So probably the switch imgPlatform.Architecture {
case "x86_64":
imgPlatform.Architecture = "amd64"
case "armv6l", "armv7l":
imgPlatform.Architecture = "arm"
case "aarch64":
imgPlatform.Architecture = "arm64"
}
switch nodePlatform.Architecture {
case "x86_64":
nodePlatform.Architecture = "amd64"
case "armv6l", "armv7l":
nodePlatform.Architecture = "arm"
case "aarch64":
nodePlatform.Architecture = "arm64"
} Something like this? |
@alexellis I agree. This is not a good situation and I am worried that having these constraints will create mutual incompatibilities. Could you see if moby/moby#34021 will work? |
I have all nodes Docker: 17.06.1-ce |
@stevvooe the PR by @nishanttotla fixes the issue - I've spent the whole day testing it... :-/ Is the Docker team aware that fast ARMv7 units are available on Scaleway's infrastructure for next to nothing? It could help with future CI and testing. @Toshik I don't believe your work-around is good for stacks? |
@alexellis, no, it is ugly workaround. And I had to recreate all services with just |
Just take this PR it fixes everything. |
Reverts raspbian changes back to https://apt.dockerproject.org, due to issues with swarm in the newest release 17.07.0-ce related to issue moby/swarmkit#2294. This will stay in place for raspbian until that issue is resolved. Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Reverts raspbian changes back to https://apt.dockerproject.org, due to issues with swarm in the newest release 17.07.0-ce related to issue moby/swarmkit#2294. This will stay in place for raspbian until that issue is resolved. Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Closing since moby/moby#34021 was merged. A longer term resolution of ARM variants will take time, but it is no longer the case that tasks don't run, so we can consider this issue resolved. |
Same problem on 17.09, have to rollback on 17.06 |
@MLescaudron this should be fixed now. Can you share the output of |
Docker info (previously I was in 17.09.2-ce)
docker service inspect
|
@MLescaudron your node reports |
Ok, so I have unistall and reinstall docker-ce on each node. |
Same here with 17.09 Docker info: Task status: |
It seems that moby/moby#34021 should have excluded more cases in addition to just "arm", like "arm64". |
This appears to be broken again on ARM64 :-( in particular I have a weird situation where it will work on Dieter's ARM64 RPi image but not on Packet's Qualcomm machine - both are "aarch64" in uname. Packet:
|
@alexellis Looking at the patch that should have fixed this, it seems like this case is not covered. Although, it seems like the placement constraint clearly reads |
OK, there's something funny going on here.
It looks like @luxas has a prometheus-arm64 image that advertises that it supports amd64/linux. |
Looking at the configuration, the architecture is reported as
Were these "cross-built" binaries? |
Looks like @luxas has a multiarch image, cf
also
|
@vielmetti @stevvooe Yes, I'm crossbuilding everything. That's by far the best way to do things IMO. Don't know if docker lets me set the os/arch (I don't think so?) |
@luxas Cross-building won't work unless you re-pack into manifest list or re-write the configuration with the correct architecture. @vielmetti There is no variant field in the base image config, so it won't be defined. We can add one there if this is a huge problem. |
This patch #2411 addresses the issue. |
Hello,
I have an armhf cluster and since 17.06 installed, I'm getting this error and my stacks doesn't come up, it stays as pending forever. There's no constraint. This was working perfectly on 17.03.
Inspecting the task, I'm getting:
docker info:
The text was updated successfully, but these errors were encountered: