Bug #113026 Your operator cannot adapt to multiple architectures
Submitted: 9 Nov 2023 14:47 Modified: 24 Nov 2023 12:48
Reporter: Bing Ma (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Operator Severity:S1 (Critical)
Version: OS:Linux
Assigned to: CPU Architecture:ARM

[9 Nov 2023 14:47] Bing Ma
There is a serious problem here. Your operator cannot adapt to multiple architectures because your image has a special flag - aarch64 under arm64. When I deploy it on an arm64 machine, I will still pull the amd64 image. , I don't know if you understand what I said.

your images:

How to repeat:
install it on arm's k8s cluster, it will pull amd64's image, of course it will fail

Suggested fix:
use other registry, like dockerhub, all in one: amd64 and arm64 will use same tag.
or in your code, if it's arm64, the append -aarch64 to image tag
[10 Nov 2023 19:12] MySQL Verification Team

What OS you tried this with? What exact hardware you tried this with?

If I understand you correctly docker pulls 

instead of 

what happens if you pull directlu aarch64?
docker pull container-registry.oracle.com/mysql/community-server:8.2.0-aarch64

[24 Nov 2023 8:18] Bing Ma
I can pull this:

but if I use `helm instll` on arm machine, it will fail unless I change the image tag mannualy

the os and arch:
cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
VERSION="22.04.2 LTS (Jammy Jellyfish)"


[24 Nov 2023 12:48] MySQL Verification Team

Thanks for clarification. I verified the behavior.
[19 Jan 17:44] Jake Holland
Any updates on this? I'm still seeing this behaviour
[20 Jan 4:45] David Bates
I can install the operator IF I manually assign the tag with "aarch64" in th Helm values.yaml file, i.e. container-registry.oracle.com/mysql/mysql-operator:8.3.0-2.1.1-aarch64. 
Great for step one, but when I try to create the innodb cluster, it pulls only AMD64 images and get the "back off" error message. I looked to find a way to correct this in the cluster values.yaml, but there is no image name shown. Also, scouring through the operator code, I cannot find anywhere where I could specify the image of the tag.

Following the MySQL instructions on https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-private-registeries.html, I should be able to "trick" Helm into pulling the aarch64 version, but I'm getting error messages about manifest files when pulling the re-tagged images, so that won’t work for now.

Any instructions, including build from source, to get aarch64 working would be super helpful.
[20 Jan 15:04] Jake Holland
I guess really this is a registry issue, because if the registry picked the right image based on architecture, we wouldn't have this issue
[22 Jan 4:45] David Bates
Should have mentioned that I am trying to deploy MySQL on OCI, using a basic OKE cluster with 3 Standard A1 Flex worker VMs each with 1 ocpu and 8 GB RAM. They are each running the OL8 worker node images (Oracle-Linux-8.8-aarch64-2023.09.26-0-OKE-1.27.2-653…figured if it’s going to work, it’ll be with your own images)