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:
None 
Category:MySQL Operator Severity:S1 (Critical)
Version: OS:Linux
Assigned to: CPU Architecture:ARM

[9 Nov 2023 14:47] Bing Ma
Description:
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:
https://container-registry.oracle.com/ords/f?p=113:4:115719165018774:::RP,4:P4_REPOSITORY,...

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
Hi,

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

If I understand you correctly docker pulls 
container-registry.oracle.com/mysql/community-server:8.2.0

instead of 
container-registry.oracle.com/mysql/community-server:8.2.0-aarch64

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

Thanks
[24 Nov 2023 8:18] Bing Ma
I can pull this:
container-registry.oracle.com/mysql/community-server:8.2.0-aarch64

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"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

###

 arch
x86_64
[24 Nov 2023 12:48] MySQL Verification Team
Hi,

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)