From c4cbf40b251a83c773144d47ad77234acfc970d7 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:56:13 -0500 Subject: [PATCH 01/22] ignore macOS filesystem files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 70d64ac1..a5d0f73f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__ .vscode /Dockerfile +.DS_Store \ No newline at end of file From ac8f7bcda2a562574357f66a63e373f4ccc5905b Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:25:55 -0500 Subject: [PATCH 02/22] force reference to -aarch64 tag --- Dockerfile.patch | 3 +++ mysqloperator/controller/config.py | 10 +++++----- tag.sh | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 Dockerfile.patch diff --git a/Dockerfile.patch b/Dockerfile.patch new file mode 100644 index 00000000..14f96dc9 --- /dev/null +++ b/Dockerfile.patch @@ -0,0 +1,3 @@ +ARG BASE_VERSION=8.3.0-2.1.2-aarch64 +FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION +COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/ \ No newline at end of file diff --git a/mysqloperator/controller/config.py b/mysqloperator/controller/config.py index e55d0069..dd77e86f 100644 --- a/mysqloperator/controller/config.py +++ b/mysqloperator/controller/config.py @@ -23,16 +23,16 @@ OPERATOR_EDITION = Edition.community OPERATOR_EDITION_NAME_TO_ENUM = { edition.value : edition.name for edition in Edition } -SHELL_VERSION = "8.3.0" +SHELL_VERSION = "8.3.0-aarch64" MIN_BASE_SERVER_ID = 1 MAX_BASE_SERVER_ID = 4000000000 -DEFAULT_VERSION_TAG = "8.3.0" +DEFAULT_VERSION_TAG = "8.3.0-aarch64" DEFAULT_SERVER_VERSION_TAG = DEFAULT_VERSION_TAG -MIN_SUPPORTED_MYSQL_VERSION = "8.0.27" -MAX_SUPPORTED_MYSQL_VERSION = "8.3.0" # SHELL_VERSION +MIN_SUPPORTED_MYSQL_VERSION = "8.0.27-aarch64" +MAX_SUPPORTED_MYSQL_VERSION = "8.3.0-aarch64" # SHELL_VERSION DISABLED_MYSQL_VERSION = { "8.0.29": "Support for MySQL 8.0.29 is disabled. Please see https://dev.mysql.com/doc/relnotes/mysql-operator/en/news-8-0-29.html" @@ -41,7 +41,7 @@ DEFAULT_ROUTER_VERSION_TAG = DEFAULT_VERSION_TAG # This is used for the sidecar. The operator version is deploy-operator.yaml -DEFAULT_OPERATOR_VERSION_TAG = "8.3.0-2.1.2" +DEFAULT_OPERATOR_VERSION_TAG = "8.3.0-2.1.2-aarch64" DEFAULT_IMAGE_REPOSITORY = os.getenv( "MYSQL_OPERATOR_DEFAULT_REPOSITORY", default="container-registry.oracle.com/mysql").rstrip('/') diff --git a/tag.sh b/tag.sh index a0ae31df..cbafcd32 100755 --- a/tag.sh +++ b/tag.sh @@ -4,6 +4,6 @@ # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ # -SUFFIX=''; [ -n "$1" ] && SUFFIX=${1} +SUFFIX='aarch64'; [ -n "$1" ] && SUFFIX=${1} echo "8.3.0-2.1.2$SUFFIX" From f8ee9c248a7815ad1b5c8a8fa9f7e679d5418244 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Thu, 7 Mar 2024 14:17:23 -0500 Subject: [PATCH 03/22] Add our readme file and add note to main readme to see ours --- README-aarch64.md | 29 +++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 34 insertions(+) create mode 100644 README-aarch64.md diff --git a/README-aarch64.md b/README-aarch64.md new file mode 100644 index 00000000..b8eaa74e --- /dev/null +++ b/README-aarch64.md @@ -0,0 +1,29 @@ +# Modified MySQL Operator for Kubernetes + +## Introduction + +This repository introduces some changes to the original operator. +The changes are needed if we want the operator (and its resources) to run on ARM64 processors. +To that end, the following files were modified: + +| File | Change Description | +| :- | :- | +| [`.gitignore`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/.gitignore) | Add .DS_Store to ignore macOS filesystem elements. | +| [`Dockerfile.patch`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/Dockerfile.patch) | Created this file to build our custom operator as suggested in [CONTRIBUTING.md](/CONTRIBUTING.md). | +| [`mysqloperator/controller/config.py`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py) | Wherever a version tag is being set, appended `-aarch64` to the value.
Changes occur on lines [26](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L26), [31](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L31), [34](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L34), [35](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L35), & [44](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L44). | +| [`tag.sh`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/tag.sh) | Set default suffix to `aarch64`. + +## Building + +To build the image, we use the new file Dockerfile.patch as the basis of the build. +The Dockerfile retrieves the fully compiled operator image, and then copies our new version of the `mysqloperator` code. + +Build the image: + +```shell +$ podman build \ + -t ghcr.io/ifeelfine/community-operator:8.3.0-2.1.2-aarch64 + --label "org.opencontainers.image.source=https://github.com/ifeelfine/mysql-operator" \ + --label "org.opencontainers.image.description=MySQL Operator image hardcoded to aarch64 achitecture" \ + --label "org.opencontainers.image.licenses=MIT" +``` \ No newline at end of file diff --git a/README.md b/README.md index 13e6d7d2..9578c6d2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +> [!WARNING] +> This branch has been modified from the [`trunk`](https://github.com/IFeelFine/mysql-operator/tree/trunk) branch. +> It includes changes that hardcode certain values. +> Please review our [README](/README-aarch64.md) file for details of the changes. +> # MySQL Operator for Kubernetes ## Introduction From 9f16cddd147b7f026edbbbb70b83c815217b6887 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Thu, 7 Mar 2024 16:51:53 -0500 Subject: [PATCH 04/22] fix readme, config.py and copy in dockerfile --- Dockerfile.patch | 2 +- README-aarch64.md | 9 ++++++--- mysqloperator/controller/config.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile.patch b/Dockerfile.patch index 14f96dc9..c7530eaa 100644 --- a/Dockerfile.patch +++ b/Dockerfile.patch @@ -1,3 +1,3 @@ ARG BASE_VERSION=8.3.0-2.1.2-aarch64 FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION -COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/ \ No newline at end of file +COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/mysqloperator diff --git a/README-aarch64.md b/README-aarch64.md index b8eaa74e..a1777f29 100644 --- a/README-aarch64.md +++ b/README-aarch64.md @@ -18,12 +18,15 @@ To that end, the following files were modified: To build the image, we use the new file Dockerfile.patch as the basis of the build. The Dockerfile retrieves the fully compiled operator image, and then copies our new version of the `mysqloperator` code. -Build the image: +Build the image (on an ARM64 host): ```shell $ podman build \ - -t ghcr.io/ifeelfine/community-operator:8.3.0-2.1.2-aarch64 + -t ghcr.io/ifeelfine/community-operator:8.3.0-2.1.2-aarch64 \ --label "org.opencontainers.image.source=https://github.com/ifeelfine/mysql-operator" \ --label "org.opencontainers.image.description=MySQL Operator image hardcoded to aarch64 achitecture" \ - --label "org.opencontainers.image.licenses=MIT" + --label "org.opencontainers.image.licenses=MIT" \ + -f Dockerfile.patch \ + . + ``` \ No newline at end of file diff --git a/mysqloperator/controller/config.py b/mysqloperator/controller/config.py index dd77e86f..dfac288d 100644 --- a/mysqloperator/controller/config.py +++ b/mysqloperator/controller/config.py @@ -19,7 +19,7 @@ # Constants -OPERATOR_VERSION = "2.1.2" +OPERATOR_VERSION = "2.1.2-aarch64" OPERATOR_EDITION = Edition.community OPERATOR_EDITION_NAME_TO_ENUM = { edition.value : edition.name for edition in Edition } From 72ecb700252b2ef572fe5d71a7a527ac7caaff25 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 8 Mar 2024 17:13:33 -0500 Subject: [PATCH 05/22] add config to handle ARM64 images --- deploy/deploy-operator.yaml | 3 ++- helm/mysql-operator/templates/deployment.yaml | 1 + mysqloperator/backup_main.py | 2 +- .../controller/backup/backup_objects.py | 9 +++++++-- mysqloperator/controller/config.py | 17 ++++++++++------- .../controller/innodbcluster/cluster_api.py | 18 ++++++++++-------- .../innodbcluster/cluster_objects.py | 3 +++ .../innodbcluster/operator_cluster.py | 4 ++-- .../controller/innodbcluster/router_objects.py | 3 +++ 9 files changed, 39 insertions(+), 21 deletions(-) diff --git a/deploy/deploy-operator.yaml b/deploy/deploy-operator.yaml index 51ac9291..571f6993 100644 --- a/deploy/deploy-operator.yaml +++ b/deploy/deploy-operator.yaml @@ -147,6 +147,7 @@ metadata: app.kubernetes.io/component: controller app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: arm64 spec: replicas: 1 selector: @@ -159,7 +160,7 @@ spec: spec: containers: - name: mysql-operator - image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2 + image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2-aarch64 imagePullPolicy: IfNotPresent args: [ diff --git a/helm/mysql-operator/templates/deployment.yaml b/helm/mysql-operator/templates/deployment.yaml index e4698aa0..268591c2 100644 --- a/helm/mysql-operator/templates/deployment.yaml +++ b/helm/mysql-operator/templates/deployment.yaml @@ -18,6 +18,7 @@ metadata: app.kubernetes.io/component: controller app.kubernetes.io/managed-by: helm app.kubernetes.io/created-by: helm + kubernetes.io/arch: "{{ if eq (((.Values).image).tag) "-aarch64" }}arm64{{ else }}amd64{{ end }}" spec: replicas: 1 selector: diff --git a/mysqloperator/backup_main.py b/mysqloperator/backup_main.py index f6a2c2eb..39ba86a9 100644 --- a/mysqloperator/backup_main.py +++ b/mysqloperator/backup_main.py @@ -369,7 +369,7 @@ def main(argv): command = args.command - logger.info(f"[BACKUP] command={command} version={config.OPERATOR_VERSION} timestamp={ts}") + logger.info(f"[BACKUP] command={command} version={config.OPERATOR_VERSION}{config.ARCH} timestamp={ts}") print(f"Command is {command}") diff --git a/mysqloperator/controller/backup/backup_objects.py b/mysqloperator/controller/backup/backup_objects.py index 014a7b75..ba5a2c02 100644 --- a/mysqloperator/controller/backup/backup_objects.py +++ b/mysqloperator/controller/backup/backup_objects.py @@ -35,6 +35,7 @@ def prepare_backup_secrets(spec: InnoDBClusterSpec) -> dict: app.kubernetes.io/instance: idc-{spec.name} app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: "{config.ARCH}" data: backupUsername: {backup_user} backupPassword: {backup_pwd} @@ -58,6 +59,7 @@ def prepare_backup_job(jobname: str, spec: MySQLBackupSpec) -> dict: app.kubernetes.io/instance: idc-{spec.name} app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: "{config.ARCH}" spec: template: spec: @@ -68,7 +70,7 @@ def prepare_backup_job(jobname: str, spec: MySQLBackupSpec) -> dict: fsGroup: 27 containers: - name: operator-backup-job - image: {spec.operator_image} + image: {spec.operator_image}{consts.ARCH} imagePullPolicy: {spec.operator_image_pull_policy} command: ["mysqlsh", "--pym", "mysqloperator", "backup", "--command", "execute-backup", @@ -133,6 +135,7 @@ def prepare_mysql_backup_object_by_profile_name(name: str, cluster_name: str, ba app.kubernetes.io/instance: idc-{cluster_name} app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: clusterName: {cluster_name} backupProfileName: {backup_profile_name} @@ -169,6 +172,7 @@ def prepare_mysql_backup_object_by_profile_object(name: str, cluster_name: str, app.kubernetes.io/instance: idc-{cluster_name} app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: clusterName: {cluster_name} backupProfile: @@ -234,6 +238,7 @@ def get_cron_job_template(spec: InnoDBClusterSpec) -> dict: app.kubernetes.io/instance: idc-{spec.name} app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: concurrencyPolicy: Forbid jobTemplate: @@ -247,7 +252,7 @@ def get_cron_job_template(spec: InnoDBClusterSpec) -> dict: fsGroup: 27 containers: - name: operator-backup-job-cron - image: {spec.operator_image} + image: {spec.operator_image}{config.IMAGE_TAG} imagePullPolicy: {spec.operator_image_pull_policy} command: ["mysqlsh", "--pym", "mysqloperator", "backup", "--command", "create-backup-object", diff --git a/mysqloperator/controller/config.py b/mysqloperator/controller/config.py index dfac288d..182bccfd 100644 --- a/mysqloperator/controller/config.py +++ b/mysqloperator/controller/config.py @@ -19,20 +19,22 @@ # Constants -OPERATOR_VERSION = "2.1.2-aarch64" +IMAGE_TAG = "-aarch64" +ARCH="arm64" +OPERATOR_VERSION = "2.1.2" OPERATOR_EDITION = Edition.community OPERATOR_EDITION_NAME_TO_ENUM = { edition.value : edition.name for edition in Edition } -SHELL_VERSION = "8.3.0-aarch64" +SHELL_VERSION = "8.3.0" MIN_BASE_SERVER_ID = 1 MAX_BASE_SERVER_ID = 4000000000 -DEFAULT_VERSION_TAG = "8.3.0-aarch64" +DEFAULT_VERSION_TAG = "8.3.0" -DEFAULT_SERVER_VERSION_TAG = DEFAULT_VERSION_TAG -MIN_SUPPORTED_MYSQL_VERSION = "8.0.27-aarch64" -MAX_SUPPORTED_MYSQL_VERSION = "8.3.0-aarch64" # SHELL_VERSION +DEFAULT_SERVER_VERSION_TAG = "8.3.0" +MIN_SUPPORTED_MYSQL_VERSION = "8.0.27" +MAX_SUPPORTED_MYSQL_VERSION = "8.3.0" # SHELL_VERSION DISABLED_MYSQL_VERSION = { "8.0.29": "Support for MySQL 8.0.29 is disabled. Please see https://dev.mysql.com/doc/relnotes/mysql-operator/en/news-8-0-29.html" @@ -41,7 +43,7 @@ DEFAULT_ROUTER_VERSION_TAG = DEFAULT_VERSION_TAG # This is used for the sidecar. The operator version is deploy-operator.yaml -DEFAULT_OPERATOR_VERSION_TAG = "8.3.0-2.1.2-aarch64" +DEFAULT_OPERATOR_VERSION_TAG = "8.3.0-2.1.2" DEFAULT_IMAGE_REPOSITORY = os.getenv( "MYSQL_OPERATOR_DEFAULT_REPOSITORY", default="container-registry.oracle.com/mysql").rstrip('/') @@ -68,6 +70,7 @@ def log_config_banner(logger) -> None: logger.info(f"DEFAULT_VERSION_TAG={DEFAULT_VERSION_TAG}") logger.info(f"SIDECAR_VERSION_TAG={DEFAULT_OPERATOR_VERSION_TAG}") logger.info(f"DEFAULT_IMAGE_REPOSITORY ={DEFAULT_IMAGE_REPOSITORY}") + logger.info(f"ARCH ={ARCH}") def config_from_env() -> None: diff --git a/mysqloperator/controller/innodbcluster/cluster_api.py b/mysqloperator/controller/innodbcluster/cluster_api.py index 6bb4d70d..6ccaa13d 100644 --- a/mysqloperator/controller/innodbcluster/cluster_api.py +++ b/mysqloperator/controller/innodbcluster/cluster_api.py @@ -750,7 +750,9 @@ class RouterSpec: instances: int = 1 # Router version, if user wants to override it (latest by default) - version: str = None # config.DEFAULT_ROUTER_VERSION_TAG +# Edit by DB 3/8/24 explicitly set version +# version: str = None # config.DEFAULT_ROUTER_VERSION_TAG + version: str = config.DEFAULT_ROUTER_VERSION_TAG + config.IMAGE_TAG podSpec: dict = {} podAnnotations: Optional[dict] = None @@ -1061,14 +1063,14 @@ def validate(self, logger: Logger) -> None: def format_image(self, image, version): if self.imageRepository: - return f"{self.imageRepository}/{image}:{version}" - return f"{image}:{version}" + return f"{self.imageRepository}/{image}:{version}{config.IMAGE_TAG}" + return f"{image}:{version}{config.IMAGE_TAG}" @property def mysql_image(self) -> str: # server image version is the one given by the user or latest by default image = config.MYSQL_SERVER_IMAGE if self.edition == Edition.community else config.MYSQL_SERVER_EE_IMAGE - return self.format_image(image, self.version) + return self.format_image(image, self.version + config.IMAGE_TAG) @property def operator_image(self) -> str: @@ -1078,7 +1080,7 @@ def operator_image(self) -> str: else: image = config.MYSQL_OPERATOR_EE_IMAGE - return self.format_image(image, self.sidecarVersion) + return self.format_image(image, self.sidecarVersion + config.ARCH) @property @@ -1433,11 +1435,11 @@ def extra_router_volume_mounts(self) -> str: @property def router_image(self) -> str: if self.router.version: - version = self.router.version + version = self.router.version + config.IMAGE_TAG elif self.version: - version = self.version + version = self.version + config.IMAGE_TAG else: - version = config.DEFAULT_ROUTER_VERSION_TAG + version = config.DEFAULT_ROUTER_VERSION_TAG + config.IMAGE_TAG image = config.MYSQL_ROUTER_IMAGE if self.edition == Edition.community else config.MYSQL_ROUTER_EE_IMAGE diff --git a/mysqloperator/controller/innodbcluster/cluster_objects.py b/mysqloperator/controller/innodbcluster/cluster_objects.py index 357c3cf5..b90699c9 100644 --- a/mysqloperator/controller/innodbcluster/cluster_objects.py +++ b/mysqloperator/controller/innodbcluster/cluster_objects.py @@ -183,6 +183,7 @@ def prepare_cluster_stateful_set(spec: AbstractServerSetSpec, logger: Logger) -> app.kubernetes.io/component: database app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: serviceName: {spec.name}-instances replicas: {spec.instances} @@ -199,6 +200,7 @@ def prepare_cluster_stateful_set(spec: AbstractServerSetSpec, logger: Logger) -> app.kubernetes.io/component: database app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} template: metadata: labels: @@ -212,6 +214,7 @@ def prepare_cluster_stateful_set(spec: AbstractServerSetSpec, logger: Logger) -> app.kubernetes.io/component: database app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: subdomain: {spec.name} readinessGates: diff --git a/mysqloperator/controller/innodbcluster/operator_cluster.py b/mysqloperator/controller/innodbcluster/operator_cluster.py index b33d6d8a..a86dbaf9 100644 --- a/mysqloperator/controller/innodbcluster/operator_cluster.py +++ b/mysqloperator/controller/innodbcluster/operator_cluster.py @@ -339,8 +339,8 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, message=f"{exc}") raise - print(f"13. Setting operator version for the IC to {DEFAULT_OPERATOR_VERSION_TAG}") - cluster.set_operator_version(DEFAULT_OPERATOR_VERSION_TAG) + print(f"13. Setting operator version for the IC to {DEFAULT_OPERATOR_VERSION_TAG}{config.IMAGE_TAG}") + cluster.set_operator_version(DEFAULT_OPERATOR_VERSION_TAG + config.IMAGE_TAG) cluster.info(action="CreateCluster", reason="ResourcesCreated", message="Dependency resources created, switching status to PENDING") cluster.set_status({ diff --git a/mysqloperator/controller/innodbcluster/router_objects.py b/mysqloperator/controller/innodbcluster/router_objects.py index 71e4e211..6de8d247 100644 --- a/mysqloperator/controller/innodbcluster/router_objects.py +++ b/mysqloperator/controller/innodbcluster/router_objects.py @@ -138,6 +138,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, app.kubernetes.io/component: router app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: replicas: {spec.router.instances or 1 if not init_only else 0} selector: @@ -150,6 +151,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, app.kubernetes.io/component: router app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} template: metadata: labels: @@ -161,6 +163,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, app.kubernetes.io/component: router app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator + kubernetes.io/arch: {config.ARCH} spec: serviceAccountName: {spec.serviceAccountName} securityContext: From 9bf67d0544fcfa76906a00b726d7a6cfca216299 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 8 Mar 2024 20:21:56 -0500 Subject: [PATCH 06/22] correct version tags --- .../controller/innodbcluster/cluster_api.py | 6 +- .../innodbcluster/operator_cluster.py | 2 +- operator-logs.log | 5467 +++++++++++++++++ 3 files changed, 5471 insertions(+), 4 deletions(-) create mode 100644 operator-logs.log diff --git a/mysqloperator/controller/innodbcluster/cluster_api.py b/mysqloperator/controller/innodbcluster/cluster_api.py index 6ccaa13d..b217d6c8 100644 --- a/mysqloperator/controller/innodbcluster/cluster_api.py +++ b/mysqloperator/controller/innodbcluster/cluster_api.py @@ -752,7 +752,7 @@ class RouterSpec: # Router version, if user wants to override it (latest by default) # Edit by DB 3/8/24 explicitly set version # version: str = None # config.DEFAULT_ROUTER_VERSION_TAG - version: str = config.DEFAULT_ROUTER_VERSION_TAG + config.IMAGE_TAG + version: str = config.DEFAULT_ROUTER_VERSION_TAG podSpec: dict = {} podAnnotations: Optional[dict] = None @@ -1070,7 +1070,7 @@ def format_image(self, image, version): def mysql_image(self) -> str: # server image version is the one given by the user or latest by default image = config.MYSQL_SERVER_IMAGE if self.edition == Edition.community else config.MYSQL_SERVER_EE_IMAGE - return self.format_image(image, self.version + config.IMAGE_TAG) + return self.format_image(image, self.version) @property def operator_image(self) -> str: @@ -1080,7 +1080,7 @@ def operator_image(self) -> str: else: image = config.MYSQL_OPERATOR_EE_IMAGE - return self.format_image(image, self.sidecarVersion + config.ARCH) + return self.format_image(image, self.sidecarVersion) @property diff --git a/mysqloperator/controller/innodbcluster/operator_cluster.py b/mysqloperator/controller/innodbcluster/operator_cluster.py index a86dbaf9..e42a34d1 100644 --- a/mysqloperator/controller/innodbcluster/operator_cluster.py +++ b/mysqloperator/controller/innodbcluster/operator_cluster.py @@ -340,7 +340,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, raise print(f"13. Setting operator version for the IC to {DEFAULT_OPERATOR_VERSION_TAG}{config.IMAGE_TAG}") - cluster.set_operator_version(DEFAULT_OPERATOR_VERSION_TAG + config.IMAGE_TAG) + cluster.set_operator_version(DEFAULT_OPERATOR_VERSION_TAG) # + config.IMAGE_TAG) cluster.info(action="CreateCluster", reason="ResourcesCreated", message="Dependency resources created, switching status to PENDING") cluster.set_status({ diff --git a/operator-logs.log b/operator-logs.log new file mode 100644 index 00000000..62e1a7bc --- /dev/null +++ b/operator-logs.log @@ -0,0 +1,5467 @@ +2024-03-08 22:16:46: Info: mysqlsh Ver 8.3.0 for Linux on aarch64 - for MySQL 8.3.0 (MySQL Community Server (GPL)) - build 13725054 - commit_id b871a975f78bf8d8cafe15536b5a6e1507c090c7 - product_id el8-arm-64bit rpm +2024-03-08 22:16:46: Info: Using credential store helper: /usr/bin/mysql-secret-store-login-path +2024-03-08 22:16:46: Info: Loading startup files... +2024-03-08 22:16:46: Info: Loading plugins... +[2024-03-08 22:16:48,835] root [INFO ] Auto-detected cluster domain: cluster.local +[2024-03-08 22:16:48,844] kopf.activities.star [INFO ] MySQL Operator/operator.py=2.1.2 timestamp=2024-03-07T17:29:23 kopf=1.35.4 uid=2 +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] KUBERNETES_VERSION =1.28 +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] OPERATOR_VERSION =2.1.2 +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] OPERATOR_EDITION =community +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] OPERATOR_EDITIONS =['community', 'enterprise'] +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] SHELL_VERSION =8.3.0 +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] DEFAULT_VERSION_TAG=8.3.0 +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] SIDECAR_VERSION_TAG=8.3.0-2.1.2 +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] DEFAULT_IMAGE_REPOSITORY =container-registry.oracle.com/mysql +[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] ARCH =arm64 +[2024-03-08 22:16:48,879] kopf.activities.star [INFO ] Checking operator version for backup schedule shared-backend/mysql-shared/daily-backup-objstore +[2024-03-08 22:16:48,894] kopf.activities.star [WARNING ] Error while ensuring shared-backend/mysql-shared uses current operator version for scheduled backups: (404) +Reason: Not Found +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'e4c2e98a-9553-45a0-8eaa-db99cea40c31', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:16:48 GMT', 'Content-Length': '272'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cronjobs.batch \"mysql-shared-daily-backup-objstore-cb\" not found","reason":"NotFound","details":{"name":"mysql-shared-daily-backup-objstore-cb","group":"batch","kind":"cronjobs"},"code":404} + + +[2024-03-08 22:16:48,908] kopf.activities.star [INFO ] Activity 'on_startup' succeeded. +[2024-03-08 22:16:48,909] kopf._core.engines.a [INFO ] Initial authentication has been initiated. +[2024-03-08 22:16:48,911] kopf.activities.auth [INFO ] Activity 'login_via_client' succeeded. +[2024-03-08 22:16:48,912] kopf._core.engines.a [INFO ] Initial authentication has finished. +[2024-03-08 22:16:49,074] kopf._core.engines.p [INFO ] Resuming operations after the pause. Conflicting operators with the same priority are gone. +[2024-03-08 22:16:49,194] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:16:49,195] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:16:49,196] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:16:49,196] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:16:49,197] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:16:49,197] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:16:49,197] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:16:49,198] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:16:49,198] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:16:49,199] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:16:49,200] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:16:49,200] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:16:49,200] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets + Creating CM mysql-shared-componentconf ... +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes + Preparing... + Creating... +2. Cluster Accounts + Preparing... + Creating... +3. Router Accounts + Preparing... + Creating... +4. Cluster Service + Preparing... + Creating Service mysql-shared-instances... +5. Cluster ServiceAccount + Existing SA: None + ImagePullSecrets: None + Preparing... + Creating...{'apiVersion': 'v1', 'kind': 'ServiceAccount', 'metadata': {'name': 'mysql-shared-sidecar-sa', 'namespace': 'shared-backend'}} +6. Cluster RoleBinding + Preparing... + Creating RoleBinding mysql-shared-sidecar-rb ... +7. Cluster StatefulSet + Preparing... + Adding keyring bits + Adding podSpec + Creating...{'apiVersion': 'apps/v1', 'kind': 'StatefulSet', 'metadata': {'name': 'mysql-shared', 'labels': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'mysql.oracle.com/instance-type': 'group-member', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared', 'app.kubernetes.io/component': 'database', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceName': 'mysql-shared-instances', 'replicas': 3, 'podManagementPolicy': 'Parallel', 'selector': {'matchLabels': {'component': 'mysqld', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'mysql.oracle.com/instance-type': 'group-member', 'app.kubernetes.io/name': 'mysql-innodbcluster-mysql-server', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-mysql-server', 'app.kubernetes.io/component': 'database', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqld', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'mysql.oracle.com/instance-type': 'group-member', 'app.kubernetes.io/name': 'mysql-innodbcluster-mysql-server', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-mysql-server', 'app.kubernetes.io/component': 'database', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'subdomain': 'mysql-shared', 'readinessGates': [{'conditionType': 'mysql.oracle.com/configured'}, {'conditionType': 'mysql.oracle.com/ready'}], 'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 27, 'runAsGroup': 27, 'fsGroup': 27}, 'terminationGracePeriodSeconds': 120, 'initContainers': [{'name': 'fixdatadir', 'image': 'container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64', 'imagePullPolicy': 'Always', 'command': ['bash', '-c', 'chown 27:27 /var/lib/mysql && chmod 0700 /var/lib/mysql'], 'securityContext': {'runAsUser': 0, 'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'add': ['CHOWN', 'FOWNER'], 'drop': ['ALL']}}, 'volumeMounts': [{'name': 'datadir', 'mountPath': '/var/lib/mysql'}], 'env': [{'name': 'MYSQL_OPERATOR_K8S_CLUSTER_DOMAIN', 'value': 'cluster.local'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}]}, {'name': 'initconf', 'image': 'container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64', 'imagePullPolicy': 'Always', 'command': ['mysqlsh', '--log-level=@INFO', '--pym', 'mysqloperator', 'init', '--pod-name', '$(POD_NAME)', '--pod-namespace', '$(POD_NAMESPACE)', '--datadir', '/var/lib/mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'POD_NAME', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.name'}}}, {'name': 'POD_NAMESPACE', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.namespace'}}}, {'name': 'MYSQL_OPERATOR_K8S_CLUSTER_DOMAIN', 'value': 'cluster.local'}, {'name': 'MYSQLSH_USER_CONFIG_HOME', 'value': '/tmp'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}], 'volumeMounts': [{'name': 'initconfdir', 'mountPath': '/mnt/initconf', 'readOnly': True}, {'name': 'datadir', 'mountPath': '/var/lib/mysql'}, {'name': 'mycnfdata', 'mountPath': '/mnt/mycnfdata'}, {'name': 'initconf-tmp', 'mountPath': '/tmp'}]}, {'name': 'initmysql', 'image': 'container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64', 'imagePullPolicy': 'Always', 'args': ['mysqld', '--user=mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_INITIALIZE_ONLY', 'value': '1'}, {'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-passwords', 'key': 'rootPassword'}}}, {'name': 'MYSQLSH_USER_CONFIG_HOME', 'value': '/tmp'}], 'volumeMounts': [{'name': 'datadir', 'mountPath': '/var/lib/mysql'}, {'name': 'rundir', 'mountPath': '/var/run/mysqld'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf.d', 'subPath': 'my.cnf.d'}, {'name': 'mycnfdata', 'mountPath': '/docker-entrypoint-initdb.d', 'subPath': 'docker-entrypoint-initdb.d'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf', 'subPath': 'my.cnf'}, {'name': 'initmysql-tmp', 'mountPath': '/tmp'}, {'name': 'varlibmysqlfiles', 'mountPath': '/var/lib/mysql-files'}, {'name': 'globalcomponentconf', 'mountPath': '/usr/sbin/mysqld.my', 'subPath': 'mysqld.my'}, {'name': 'ocikey', 'mountPath': '/.oci'}, {'name': 'keyringfile-conf', 'mountPath': '/usr/lib64/mysql/plugin/component_keyring_oci.cnf', 'subPath': 'component_keyring_oci.cnf'}]}], 'containers': [{'name': 'sidecar', 'image': 'container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64', 'imagePullPolicy': 'Always', 'command': ['mysqlsh', '--pym', 'mysqloperator', 'sidecar', '--pod-name', '$(POD_NAME)', '--pod-namespace', '$(POD_NAMESPACE)', '--datadir', '/var/lib/mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'POD_NAME', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.name'}}}, {'name': 'POD_NAMESPACE', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.namespace'}}}, {'name': 'MYSQL_UNIX_PORT', 'value': '/var/run/mysqld/mysql.sock'}, {'name': 'MYSQLSH_USER_CONFIG_HOME', 'value': '/mysqlsh'}, {'name': 'MYSQL_OPERATOR_K8S_CLUSTER_DOMAIN', 'value': 'cluster.local'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}], 'volumeMounts': [{'name': 'rundir', 'mountPath': '/var/run/mysqld'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf.d', 'subPath': 'my.cnf.d'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf', 'subPath': 'my.cnf'}, {'name': 'shellhome', 'mountPath': '/mysqlsh'}, {'name': 'sidecar-tmp', 'mountPath': '/tmp'}]}, {'name': 'mysql', 'image': 'container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64', 'imagePullPolicy': 'always', 'args': ['mysqld', '--user=mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'lifecycle': {'preStop': {'exec': {'command': ['sh', '-c', 'sleep 60 && mysqladmin -ulocalroot shutdown']}}}, 'startupProbe': {'exec': {'command': ['/livenessprobe.sh', '8']}, 'initialDelaySeconds': 5, 'periodSeconds': 3, 'failureThreshold': 10000, 'successThreshold': 1, 'timeout': 2}, 'readinessProbe': {'exec': {'command': ['/readinessprobe.sh']}, 'periodSeconds': 5, 'initialDelaySeconds': 10, 'failureThreshold': 10000}, 'livenessProbe': {'exec': {'command': ['/livenessprobe.sh']}, 'initialDelaySeconds': 15, 'periodSeconds': 15, 'failureThreshold': 10, 'successThreshold': 1, 'timeout': 5}, 'env': [{'name': 'MYSQL_UNIX_PORT', 'value': '/var/run/mysqld/mysql.sock'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}, {'containerPort': 33060, 'name': 'mysqlx'}, {'containerPort': 33061, 'name': 'gr-xcom'}], 'volumeMounts': [{'name': 'datadir', 'mountPath': '/var/lib/mysql'}, {'name': 'rundir', 'mountPath': '/var/run/mysqld'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf.d', 'subPath': 'my.cnf.d'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf', 'subPath': 'my.cnf'}, {'name': 'initconfdir', 'mountPath': '/livenessprobe.sh', 'subPath': 'livenessprobe.sh'}, {'name': 'initconfdir', 'mountPath': '/readinessprobe.sh', 'subPath': 'readinessprobe.sh'}, {'name': 'varlibmysqlfiles', 'mountPath': '/var/lib/mysql-files'}, {'name': 'mysql-tmp', 'mountPath': '/tmp'}, {'name': 'globalcomponentconf', 'mountPath': '/usr/sbin/mysqld.my', 'subPath': 'mysqld.my'}, {'name': 'ocikey', 'mountPath': '/.oci'}, {'name': 'keyringfile-conf', 'mountPath': '/usr/lib64/mysql/plugin/component_keyring_oci.cnf', 'subPath': 'component_keyring_oci.cnf'}], 'resources': {'limits': {'cpu': '300m', 'memory': '5120Mi'}, 'requests': {'cpu': '100m', 'memory': '1024Mi'}}}], 'volumes': [{'name': 'mycnfdata', 'emptyDir': {}}, {'name': 'rundir', 'emptyDir': {}}, {'name': 'varlibmysqlfiles', 'emptyDir': {}}, {'name': 'initconfdir', 'configMap': {'name': 'mysql-shared-initconf', 'defaultMode': 493}}, {'name': 'shellhome', 'emptyDir': {}}, {'name': 'initconf-tmp', 'emptyDir': {}}, {'name': 'initmysql-tmp', 'emptyDir': {}}, {'name': 'mysql-tmp', 'emptyDir': {}}, {'name': 'sidecar-tmp', 'emptyDir': {}}, {'name': 'globalcomponentconf', 'configMap': {'name': 'mysql-shared-componentconf', 'items': [{'key': 'mysqld.my', 'path': 'mysqld.my'}]}}, {'name': 'ocikey', 'secret': {'secretName': 'oci-oke-service-account'}}, {'name': 'keyringfile-conf', 'configMap': {'name': 'mysql-shared-componentconf', 'items': [{'key': 'component_keyring_oci.cnf', 'path': 'component_keyring_oci.cnf'}]}}]}}, 'volumeClaimTemplates': [{'metadata': {'name': 'datadir'}, 'spec': {'accessModes': ['ReadWriteOnce'], 'resources': {'requests': {'storage': '2Gi'}}}}]}} +8. Cluster PodDisruptionBudget + Preparing... + Creating... +9. Read Replica StatefulSets + No Read Replica +10. Router Service + Preparing... + Creating... +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:16:49,788] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '9f56e3f6-33e6-4050-80d7-1587e2a45548', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:16:49 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:16:49,937] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:16:49,940] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:17:00,089] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:17:00,092] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:17:10,229] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:17:10,232] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:17:20,368] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:17:20,371] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:17:30,512] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:17:30,515] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:17:40,648] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:17:40,655] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:17:49,941] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:17:49,944] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:17:49,944] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:17:49,945] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:17:49,945] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:17:49,945] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:17:49,945] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:17:49,946] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:17:49,946] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:17:49,946] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:17:49,947] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:17:49,947] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:17:49,947] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:17:50,052] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '2b572cf2-4c80-4560-abe3-f4b31bba4e61', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:17:50 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:17:50,788] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:17:50,790] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:18:00,950] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:18:00,955] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:18:11,104] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:18:11,109] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:18:21,249] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:18:21,252] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:18:31,392] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:18:31,395] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:18:41,532] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:18:41,534] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:18:50,205] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:18:50,208] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:18:50,209] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:18:50,209] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:18:50,209] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:18:50,210] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:18:50,210] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:18:50,210] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:18:50,211] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:18:50,211] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:18:50,211] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:18:50,212] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:18:50,212] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:18:50,310] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '6f1534a5-2aa8-4f1a-a6fb-3a417d1083db', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:18:50 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:18:51,669] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:18:51,671] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:19:01,809] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:19:01,814] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:19:11,953] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:19:11,957] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:19:22,099] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:19:22,102] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:19:32,235] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:19:32,238] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:19:42,390] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:19:42,392] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:19:50,458] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:19:50,460] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:19:50,461] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:19:50,461] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:19:50,462] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:19:50,462] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:19:50,463] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:19:50,463] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:19:50,463] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:19:50,463] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:19:50,464] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:19:50,464] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:19:50,464] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:19:50,580] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '4af76bd8-7b15-4d7f-834b-c01287f8c587', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:19:50 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:19:52,527] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:19:52,530] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:20:02,672] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:20:02,677] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:20:12,815] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:20:12,818] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:20:22,956] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:20:22,959] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:20:33,101] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:20:33,109] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:20:43,248] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:20:43,251] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:20:50,720] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:20:50,722] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:20:50,723] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:20:50,724] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:20:50,724] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:20:50,724] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:20:50,725] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:20:50,725] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:20:50,725] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:20:50,726] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:20:50,726] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:20:50,726] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:20:50,727] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:20:50,834] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '261f4dba-b578-44c7-a970-7997052c1d96', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:20:50 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:20:53,419] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:20:53,424] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:21:03,579] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:21:03,583] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:21:13,721] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:21:13,724] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:21:23,862] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:21:23,867] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:21:34,023] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:21:34,029] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:21:44,169] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:21:44,171] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:21:50,998] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:21:51,001] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:21:51,001] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:21:51,002] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:21:51,002] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:21:51,002] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:21:51,003] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:21:51,004] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:21:51,004] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:21:51,004] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:21:51,005] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:21:51,005] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:21:51,005] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:21:51,112] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '4dd0f3ab-a5e0-4174-b000-03169baef6a0', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:21:51 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:21:54,328] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:21:54,333] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:22:04,470] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:22:04,472] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:22:14,613] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:22:14,616] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:22:24,761] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:22:24,765] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:22:34,904] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:22:34,906] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:22:45,044] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:22:45,047] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:22:51,250] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:22:51,252] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:22:51,253] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:22:51,253] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:22:51,254] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:22:51,254] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:22:51,254] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:22:51,255] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:22:51,255] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:22:51,255] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:22:51,256] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:22:51,256] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:22:51,256] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:22:51,368] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '9df110f6-688a-4682-b484-5d30237d5fe7', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:22:51 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:22:55,184] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:22:55,190] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:23:05,328] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:23:05,331] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:23:15,471] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:23:15,473] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:23:25,617] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:23:25,623] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:23:35,760] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:23:35,762] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:23:45,900] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:23:45,903] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:23:51,506] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:23:51,508] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:23:51,509] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:23:51,510] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:23:51,510] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:23:51,510] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:23:51,511] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:23:51,511] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:23:51,511] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:23:51,512] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:23:51,512] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:23:51,512] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:23:51,513] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:23:51,676] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '8955a109-75c5-4867-9eff-97531dd2309b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:23:51 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:23:56,105] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:23:56,113] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:24:06,249] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:24:06,252] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:24:16,387] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:24:16,390] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:24:26,561] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:24:26,567] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:24:36,720] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:24:36,723] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:24:46,858] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:24:46,860] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:24:51,817] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:24:51,820] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:24:51,820] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:24:51,820] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:24:51,820] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:24:51,821] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:24:51,821] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:24:51,821] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:24:51,822] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:24:51,822] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:24:51,822] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:24:51,823] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:24:51,823] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:24:51,920] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '05427c06-0528-4f22-9f8b-0782e79cc031', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:24:51 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:24:57,018] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:24:57,026] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:25:07,161] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:25:07,164] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:25:17,308] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:25:17,310] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:25:27,446] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:25:27,449] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:25:37,584] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:25:37,587] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:25:47,723] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:25:47,725] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:25:52,063] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:25:52,064] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:25:52,065] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:25:52,066] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:25:52,066] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:25:52,066] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:25:52,066] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:25:52,067] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:25:52,067] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:25:52,067] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:25:52,068] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:25:52,068] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:25:52,068] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:25:52,164] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'd0352b7a-658d-4837-8e75-ce5d683afd64', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:25:52 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:25:57,861] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:25:57,864] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:26:07,999] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:26:08,002] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:26:18,146] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:26:18,148] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:26:28,285] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:26:28,287] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:26:38,430] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:26:38,432] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:26:48,574] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:26:48,576] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:26:52,306] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:26:52,308] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:26:52,308] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:26:52,309] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:26:52,309] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:26:52,309] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:26:52,310] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:26:52,310] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:26:52,310] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:26:52,311] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:26:52,311] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:26:52,311] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:26:52,311] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:26:52,413] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '72044adb-ee3d-4d8f-a17a-cc9ad3c0c541', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:26:52 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:26:58,721] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:26:58,724] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:27:08,872] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:27:08,879] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:27:19,018] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:27:19,020] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:27:29,157] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:27:29,160] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:27:39,304] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:27:39,308] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:27:49,459] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:27:49,464] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:27:52,555] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:27:52,558] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:27:52,558] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:27:52,558] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:27:52,559] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:27:52,559] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:27:52,559] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:27:52,560] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:27:52,560] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:27:52,560] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:27:52,561] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:27:52,561] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:27:52,561] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:27:52,654] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '791d5fa4-ddd7-465e-b532-d2e7ac67304e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:27:52 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:27:59,622] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:27:59,626] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:28:09,762] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:28:09,764] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:28:19,907] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:28:19,909] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:28:30,060] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:28:30,064] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:28:40,199] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:28:40,202] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:28:50,339] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:28:50,341] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:28:52,794] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:28:52,796] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:28:52,796] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:28:52,797] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:28:52,797] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:28:52,797] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:28:52,798] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:28:52,798] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:28:52,798] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:28:52,799] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:28:52,799] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:28:52,799] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:28:52,799] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:28:52,894] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '3d28fe94-1737-4285-a3d6-317b8f78b016', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:28:52 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:29:00,481] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:29:00,483] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:29:10,621] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:29:10,626] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:29:20,762] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:29:20,765] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:29:30,899] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:29:30,902] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:29:41,036] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:29:41,038] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:29:51,180] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:29:51,183] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:29:53,031] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:29:53,033] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:29:53,034] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:29:53,034] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:29:53,034] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:29:53,035] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:29:53,035] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:29:53,035] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:29:53,035] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:29:53,036] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:29:53,036] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:29:53,036] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:29:53,037] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:29:53,129] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '8e32b43c-3e3c-4756-bddd-6b2f160322c2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:29:53 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:30:01,324] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:30:01,326] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:30:11,469] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:30:11,472] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:30:21,607] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:30:21,609] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:30:31,751] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:30:31,754] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:30:41,889] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:30:41,892] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:30:52,028] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:30:52,031] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:30:53,267] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:30:53,269] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:30:53,270] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:30:53,270] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:30:53,270] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:30:53,271] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:30:53,271] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:30:53,271] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:30:53,271] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:30:53,272] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:30:53,272] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:30:53,272] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:30:53,273] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:30:53,383] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b14509e8-5ef9-46bf-86a3-fc75a968be11', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:30:53 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:31:02,172] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:31:02,175] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:31:12,315] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:31:12,318] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:31:22,468] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:31:22,470] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:31:32,613] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:31:32,616] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:31:42,750] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:31:42,752] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:31:52,912] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:31:52,915] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:31:53,529] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +0. Components ConfigMaps and Secrets +[2024-03-08 22:31:53,541] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:31:53,541] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:31:53,543] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:31:53,544] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:31:53,544] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:31:53,544] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:31:53,544] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:31:53,545] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:31:53,545] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:31:53,545] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:31:53,546] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:31:53,546] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:31:53,696] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '157d0317-5da3-40f5-92bc-861780511710', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:31:53 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:32:03,067] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:32:03,071] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:32:13,211] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:32:13,213] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:32:23,348] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:32:23,351] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:32:33,484] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:32:33,487] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:32:43,623] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:32:43,625] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:32:53,768] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:32:53,773] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:32:53,775] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:32:53,775] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:32:53,775] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:32:53,775] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:32:53,777] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:32:53,777] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:32:53,777] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:32:53,778] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:32:53,779] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:32:53,779] kopf.objects [INFO ] Backup schedules: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:32:53,780] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:32:53,918] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b8996f72-6690-4eba-a2a1-6e29e1371018', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:32:53 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:32:54,052] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:32:54,057] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:33:04,190] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:33:04,193] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:33:14,328] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:33:14,331] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:33:24,468] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:33:24,473] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:33:34,641] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:33:34,644] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:33:44,779] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:33:44,782] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:33:54,064] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:33:54,069] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:33:54,071] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:33:54,071] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:33:54,071] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:33:54,071] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:33:54,073] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:33:54,073] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:33:54,073] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:33:54,073] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:33:54,074] kopf.objects [INFO ] Backup profiles: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:33:54,078] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:33:54,080] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:33:54,217] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '13e96880-613a-44f9-a620-00fb13f8c941', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:33:54 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:33:54,916] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:33:54,921] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:34:05,066] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:34:05,069] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:34:15,203] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:34:15,205] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:34:25,339] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:34:25,342] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:34:35,483] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:34:35,485] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:34:45,622] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:34:45,626] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:34:54,366] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:34:54,370] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:34:54,371] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:34:54,371] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:34:54,371] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:34:54,371] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:34:54,373] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:34:54,373] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:34:54,373] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:34:54,373] kopf.objects [INFO ] Router instances: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:34:54,375] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:34:54,375] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:34:54,375] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:34:54,521] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a5380698-7082-4d27-a75e-374843c20d8b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:34:54 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:34:55,765] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:34:55,770] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:35:05,912] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:35:05,915] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:35:16,049] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:35:16,051] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:35:26,224] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:35:26,227] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:35:36,386] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:35:36,390] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:35:46,523] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:35:46,526] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:35:54,709] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:35:54,716] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:35:54,716] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:35:54,716] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:35:54,718] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:35:54,718] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:35:54,718] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:35:54,723] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:35:54,723] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:35:54,724] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:35:54,724] kopf.objects [INFO ] Backup profiles: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:35:54,724] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:35:54,725] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:35:54,862] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'dec9afb6-110c-4708-a5cf-715d3ec5c37c', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:35:54 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:35:56,662] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:35:56,664] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:36:06,804] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:36:06,808] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:36:16,942] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:36:16,945] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:36:27,091] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:36:27,094] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:36:37,229] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:36:37,231] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:36:47,371] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:36:47,373] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:36:55,054] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:36:55,056] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:36:55,057] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:36:55,057] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:36:55,057] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:36:55,058] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:36:55,058] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:36:55,058] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:36:55,058] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:36:55,059] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:36:55,059] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:36:55,059] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:36:55,060] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:36:55,163] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '5d05e74f-22ac-4fa7-a150-884b4548d1e5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:36:55 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:36:57,508] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:36:57,510] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:37:07,646] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:37:07,648] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:37:17,789] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:37:17,792] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:37:27,931] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:37:27,933] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:37:38,069] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:37:38,071] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:37:48,205] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:37:48,207] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:37:55,319] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:37:55,323] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:37:55,325] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:37:55,325] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:37:55,326] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:37:55,326] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:37:55,327] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:37:55,327] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:37:55,327] kopf.objects [INFO ] Log collection: False +0. Components ConfigMaps and Secrets +[2024-03-08 22:37:55,328] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:37:55,329] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:37:55,329] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:37:55,329] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:37:55,478] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a98fc560-0480-49c4-ae87-2d0946ed9852', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:37:55 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:37:58,345] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:37:58,347] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:38:08,492] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:38:08,494] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:38:18,641] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:38:18,643] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:38:28,780] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:38:28,783] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:38:38,920] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:38:38,922] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:38:49,057] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:38:49,059] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:38:55,624] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:38:55,629] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:38:55,631] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:38:55,631] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:38:55,631] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:38:55,632] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:38:55,632] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:38:55,633] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:38:55,633] kopf.objects [INFO ] Log collection: False +0. Components ConfigMaps and Secrets +[2024-03-08 22:38:55,634] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:38:55,634] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:38:55,634] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:38:55,635] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:38:55,774] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '1fa5ef80-c67a-4a0d-8c97-f5ef18481a2a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:38:55 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:38:59,194] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:38:59,197] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:39:09,344] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:39:09,347] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:39:19,485] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:39:19,488] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:39:29,630] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:39:29,633] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:39:39,783] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:39:39,792] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:39:49,938] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:39:49,940] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:39:55,951] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:39:55,958] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:39:55,960] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:39:55,960] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:39:55,960] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:39:55,960] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:39:55,960] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:39:55,965] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:39:55,966] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:39:55,967] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:39:55,967] kopf.objects [INFO ] Backup profiles: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:39:55,968] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:39:55,971] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:39:56,106] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ae5137a3-2089-42dc-8e5c-a6d2a6014f76', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:39:56 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:40:00,079] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:40:00,081] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:40:10,216] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:40:10,222] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:40:20,358] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:40:20,360] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:40:30,496] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:40:30,499] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:40:40,639] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:40:40,642] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:40:50,777] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:40:50,779] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:40:56,257] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:40:56,261] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:40:56,263] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:40:56,263] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:40:56,263] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:40:56,264] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:40:56,264] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:40:56,265] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:40:56,266] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:40:56,266] kopf.objects [INFO ] Router instances: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:40:56,266] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:40:56,271] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:40:56,272] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:40:56,411] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '7b7683ef-6de2-43f6-ae3c-129406ad5cb2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:40:56 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:41:00,915] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:41:00,917] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:41:11,053] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:41:11,056] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:41:21,189] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:41:21,192] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:41:31,338] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:41:31,341] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:41:41,478] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:41:41,482] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:41:51,629] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:41:51,631] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:41:56,554] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:41:56,557] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:41:56,557] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:41:56,558] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:41:56,558] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:41:56,558] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:41:56,559] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:41:56,559] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:41:56,559] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:41:56,559] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:41:56,560] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:41:56,560] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:41:56,560] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:41:56,676] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f083c4e4-272a-4195-8862-15b9d575cb3e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:41:56 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:42:01,769] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:42:01,771] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:42:11,905] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:42:11,907] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:42:22,046] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:42:22,050] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:42:32,195] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:42:32,198] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:42:42,332] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:42:42,334] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:42:52,478] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:42:52,480] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:42:56,815] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:42:56,816] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:42:56,817] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:42:56,818] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:42:56,818] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:42:56,818] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:42:56,819] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:42:56,819] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:42:56,819] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:42:56,819] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:42:56,820] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:42:56,820] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:42:56,820] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:42:56,915] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b43c3109-22d7-4ea0-addf-a3d4bce7d6a1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:42:56 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:43:02,612] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:43:02,614] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:43:12,753] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:43:12,757] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:43:22,891] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:43:22,894] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:43:33,031] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:43:33,033] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:43:43,185] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:43:43,190] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:43:53,346] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:43:53,350] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:43:57,074] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:43:57,078] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:43:57,078] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:43:57,078] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:43:57,079] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:43:57,079] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:43:57,079] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:43:57,080] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:43:57,080] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:43:57,080] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:43:57,081] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:43:57,081] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:43:57,081] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:43:57,175] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '64eb7ce0-eaa4-4ee8-86b6-02e9dbdec601', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:43:57 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:44:03,483] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:44:03,485] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:44:13,634] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:44:13,637] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:44:23,779] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:44:23,784] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:44:33,918] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:44:33,921] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:44:44,064] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:44:44,067] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:44:54,203] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:44:54,208] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:44:57,315] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:44:57,318] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:44:57,320] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:44:57,320] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:44:57,320] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:44:57,321] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:44:57,322] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:44:57,322] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:44:57,322] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:44:57,322] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:44:57,323] kopf.objects [INFO ] Backup profiles: 1 +0. Components ConfigMaps and Secrets +[2024-03-08 22:44:57,325] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:44:57,329] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:44:57,463] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b2f4dc5e-d8e7-4218-9f22-040103e8bfed', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:44:57 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:45:04,389] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:45:04,391] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:45:14,530] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:45:14,533] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:45:24,668] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:45:24,671] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:45:34,815] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:45:34,817] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:45:44,952] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:45:44,956] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:45:55,090] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:45:55,097] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:45:57,603] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:45:57,606] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:45:57,607] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:45:57,608] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:45:57,608] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:45:57,608] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:45:57,608] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:45:57,609] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:45:57,609] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:45:57,609] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:45:57,609] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:45:57,610] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:45:57,611] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:45:57,707] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '2bd4d8a7-a359-4988-9985-0261a3942cf1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:45:57 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:46:05,236] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:46:05,238] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:46:15,388] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:46:15,390] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:46:25,529] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:46:25,533] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:46:35,685] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:46:35,687] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:46:45,822] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:46:45,825] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:46:56,000] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:46:56,007] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:46:57,849] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:46:57,851] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:46:57,852] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:46:57,852] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:46:57,852] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:46:57,852] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:46:57,853] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:46:57,853] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:46:57,854] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:46:57,854] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:46:57,854] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:46:57,854] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:46:57,855] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:46:57,952] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '505596ef-b130-425e-83bd-bfa76efc0f51', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:46:57 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:47:06,150] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:47:06,152] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:47:16,297] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:47:16,301] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:47:26,445] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:47:26,450] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:47:36,585] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:47:36,589] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:47:46,726] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:47:46,729] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:47:56,872] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:47:56,880] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:47:58,091] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:47:58,093] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:47:58,094] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:47:58,094] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:47:58,095] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:47:58,095] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:47:58,095] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:47:58,096] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:47:58,096] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:47:58,096] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:47:58,096] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:47:58,097] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:47:58,097] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:47:58,191] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '1dd4a88f-b56c-44b6-b00d-8336cb964bb2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:47:58 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:48:07,018] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:48:07,020] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:48:17,160] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:48:17,162] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:48:27,294] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:48:27,297] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:48:37,446] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:48:37,448] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:48:47,591] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:48:47,594] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:48:57,739] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:48:57,742] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:48:58,330] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:48:58,332] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:48:58,332] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:48:58,333] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:48:58,333] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:48:58,333] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:48:58,334] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:48:58,334] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:48:58,334] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:48:58,334] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:48:58,335] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:48:58,335] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:48:58,335] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:48:58,430] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '34f5019d-65f7-4f65-bf19-b7bd62cc69be', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:48:58 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:49:07,877] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:49:07,879] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:49:18,019] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:49:18,026] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:49:28,165] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:49:28,168] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:49:38,303] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:49:38,305] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:49:48,439] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:49:48,441] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:49:58,580] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:49:58,583] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:49:58,584] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:49:58,584] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:49:58,584] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:49:58,585] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:49:58,585] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:49:58,585] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:49:58,586] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:49:58,586] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:49:58,586] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:49:58,587] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:49:58,587] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:49:58,680] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ee8ac3e5-37a1-48c7-ad19-26211de66637', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:49:58 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:49:58,814] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:49:58,816] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:50:08,953] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:50:08,958] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:50:19,093] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:50:19,095] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:50:29,250] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:50:29,253] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:50:39,403] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:50:39,407] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:50:49,544] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:50:49,547] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:50:58,833] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:50:58,835] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:50:58,836] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:50:58,836] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:50:58,836] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:50:58,837] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:50:58,837] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:50:58,837] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:50:58,838] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:50:58,838] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:50:58,838] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:50:58,839] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:50:58,839] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:50:58,938] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '4becbf27-3b01-4703-9680-55ac1c0384f0', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:50:58 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:50:59,682] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:50:59,684] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:51:09,819] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:51:09,821] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:51:19,959] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:51:19,961] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:51:30,100] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:51:30,102] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:51:40,245] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:51:40,247] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:51:50,386] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:51:50,388] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:51:59,079] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:51:59,081] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:51:59,081] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:51:59,082] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:51:59,082] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:51:59,082] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:51:59,083] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:51:59,083] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:51:59,083] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:51:59,084] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:51:59,084] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:51:59,084] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:51:59,084] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:51:59,189] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '076f70eb-d16c-443d-ae74-243a5116f5c5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:51:59 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:52:00,522] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:52:00,524] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:52:10,666] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:52:10,672] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:52:20,817] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:52:20,819] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:52:30,969] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:52:30,972] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:52:41,111] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:52:41,113] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:52:51,248] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:52:51,251] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:52:59,331] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:52:59,334] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:52:59,335] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:52:59,335] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:52:59,335] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:52:59,336] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:52:59,336] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:52:59,336] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:52:59,336] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:52:59,337] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:52:59,337] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:52:59,338] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:52:59,338] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:52:59,431] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b9cb44e4-8713-478b-b172-2e69aa5e426c', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:52:59 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:53:01,386] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:53:01,388] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:53:11,527] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:53:11,529] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:53:21,665] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:53:21,668] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:53:31,808] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:53:31,811] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:53:41,949] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:53:41,956] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:53:52,096] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:53:52,098] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:53:59,595] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:53:59,598] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:53:59,599] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:53:59,599] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:53:59,599] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:53:59,599] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:53:59,600] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:53:59,600] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:53:59,601] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:53:59,601] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:53:59,601] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:53:59,601] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:53:59,602] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:53:59,702] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '6530ad6a-77d1-4c92-b574-b0b562c37cac', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:53:59 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:54:02,232] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:54:02,235] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:54:12,373] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:54:12,375] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:54:22,525] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:54:22,529] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:54:32,663] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:54:32,665] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:54:42,800] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:54:42,802] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:54:52,936] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:54:52,938] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:54:59,842] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:54:59,844] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:54:59,845] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:54:59,845] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:54:59,846] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:54:59,846] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:54:59,846] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:54:59,847] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:54:59,847] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:54:59,847] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:54:59,848] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:54:59,848] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:54:59,848] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:54:59,941] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '6b179ee6-028e-4ec7-97ec-4fffc2faa620', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:54:59 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:55:03,076] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:55:03,081] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:55:13,218] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:55:13,221] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:55:23,376] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:55:23,379] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:55:33,513] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:55:33,515] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:55:43,671] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:55:43,674] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:55:53,808] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:55:53,811] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:56:00,082] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:56:00,084] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:56:00,085] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:56:00,086] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:56:00,086] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:56:00,086] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:56:00,087] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:56:00,087] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:56:00,087] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:56:00,087] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:56:00,088] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:56:00,088] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:56:00,088] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:56:00,184] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '5d4e592a-1382-4c24-8f98-4a41947457f5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:56:00 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:56:03,944] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:56:03,946] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:56:14,080] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:56:14,083] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:56:24,222] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:56:24,227] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:56:34,384] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:56:34,387] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:56:44,529] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:56:44,533] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:56:54,675] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:56:54,679] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:57:00,341] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:57:00,343] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:57:00,344] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:57:00,344] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:57:00,344] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:57:00,345] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:57:00,345] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:57:00,345] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:57:00,346] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:57:00,346] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:57:00,346] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:57:00,346] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:57:00,347] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:57:00,511] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '5e0a2fa2-161d-46ec-a466-248af65bfeef', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:57:00 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:57:04,820] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:57:04,822] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:57:14,966] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:57:14,968] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:57:25,142] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:57:25,148] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:57:35,284] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:57:35,286] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:57:45,444] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:57:45,448] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:57:55,585] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:57:55,587] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:58:00,660] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:58:00,663] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:58:00,664] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:58:00,664] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:58:00,664] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:58:00,664] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:58:00,665] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:58:00,665] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:58:00,666] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:58:00,666] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:58:00,666] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:58:00,667] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:58:00,667] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:58:00,768] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'cf8380b2-0d10-414f-ace6-f0812106ab84', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:58:00 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:58:05,723] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:58:05,725] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:58:15,864] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:58:15,867] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:58:26,003] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:58:26,009] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:58:36,153] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:58:36,156] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:58:46,295] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:58:46,299] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:58:56,446] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:58:56,450] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:59:00,906] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 22:59:00,908] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 22:59:00,909] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 22:59:00,909] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 22:59:00,909] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 22:59:00,910] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 22:59:00,910] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 22:59:00,910] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 22:59:00,911] kopf.objects [INFO ] Log collection: False +[2024-03-08 22:59:00,911] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 22:59:00,911] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 22:59:00,911] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 22:59:00,912] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 22:59:01,009] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '21f6568b-feb1-4e07-8fcf-74e6d252739f', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:59:01 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 22:59:06,595] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:59:06,598] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:59:16,735] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:59:16,737] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:59:26,881] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:59:26,884] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:59:37,045] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:59:37,053] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:59:47,195] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:59:47,198] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 22:59:57,332] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 22:59:57,335] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:00:01,147] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:00:01,149] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:00:01,150] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:00:01,150] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:00:01,150] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:00:01,151] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:00:01,151] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:00:01,151] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:00:01,152] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:00:01,152] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:00:01,152] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:00:01,152] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:00:01,153] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:00:01,259] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '71309da2-4e9b-4737-9e6b-8360277f43ca', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:00:01 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:00:07,471] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:00:07,473] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:00:17,611] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:00:17,615] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:00:27,751] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:00:27,754] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:00:37,912] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:00:37,916] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:00:48,091] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:00:48,095] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:00:58,244] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:00:58,248] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:01:01,412] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:01:01,415] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:01:01,415] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:01:01,416] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:01:01,416] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:01:01,416] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:01:01,416] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:01:01,417] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:01:01,417] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:01:01,418] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:01:01,418] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:01:01,418] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:01:01,418] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:01:01,524] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ad0b5ff9-df6c-463c-88e7-cefe136cdf57', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:01:01 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:01:08,385] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:01:08,388] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:01:18,528] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:01:18,530] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:01:28,674] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:01:28,676] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:01:38,811] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:01:38,813] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:01:48,947] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:01:48,952] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:01:59,091] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:01:59,093] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:02:01,662] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:02:01,664] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:02:01,665] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:02:01,665] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:02:01,665] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:02:01,666] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:02:01,666] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:02:01,666] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:02:01,667] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:02:01,667] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:02:01,667] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:02:01,667] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:02:01,668] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:02:01,763] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '56d9629f-4f2e-44ad-b038-feb28809b3ec', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:02:01 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:02:09,229] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:02:09,232] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:02:19,383] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:02:19,385] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:02:29,526] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:02:29,528] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:02:39,664] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:02:39,668] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:02:49,811] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:02:49,813] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:02:59,950] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:02:59,958] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:03:01,903] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:03:01,905] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:03:01,906] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:03:01,906] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:03:01,906] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:03:01,907] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:03:01,907] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:03:01,907] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:03:01,908] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:03:01,908] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:03:01,908] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:03:01,908] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:03:01,909] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:03:02,006] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'efbd80de-e34c-4f25-9426-e54f94f30d1b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:03:01 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:03:10,100] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:03:10,102] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:03:20,243] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:03:20,246] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:03:30,383] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:03:30,386] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:03:40,519] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:03:40,521] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:03:50,655] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:03:50,657] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:04:00,875] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:04:00,880] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:04:02,149] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:04:02,151] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:04:02,152] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:04:02,152] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:04:02,153] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:04:02,153] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:04:02,153] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:04:02,154] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:04:02,154] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:04:02,154] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:04:02,155] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:04:02,155] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:04:02,155] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:04:02,253] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '65d85d41-2b8c-47ce-bc97-ab4085932550', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:04:02 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:04:11,025] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:04:11,027] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:04:21,163] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:04:21,166] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:04:31,301] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:04:31,303] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:04:41,444] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:04:41,450] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:04:51,584] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:04:51,586] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:05:01,728] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:05:01,730] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:05:02,390] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:05:02,392] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:05:02,393] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:05:02,393] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:05:02,394] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:05:02,394] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:05:02,394] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:05:02,395] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:05:02,395] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:05:02,395] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:05:02,395] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:05:02,396] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:05:02,396] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:05:02,495] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a6cfe855-db45-46e1-99dd-69991cda2941', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:05:02 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:05:11,873] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:05:11,875] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:05:22,009] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:05:22,011] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:05:32,154] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:05:32,157] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:05:42,298] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:05:42,301] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:05:52,444] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:05:52,446] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:06:02,591] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:06:02,597] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:06:02,598] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:06:02,598] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:06:02,599] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:06:02,599] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:06:02,599] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:06:02,602] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:06:02,602] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:06:02,602] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:06:02,603] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:06:02,603] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:06:02,603] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:06:02,739] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': '5655a991-bbc7-4996-8272-d4c5b34ac5f5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:06:02 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:06:02,886] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:06:02,895] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:06:13,038] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:06:13,041] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:06:23,181] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:06:23,183] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:06:33,331] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:06:33,334] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:06:43,470] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:06:43,472] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:06:53,617] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:06:53,623] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:07:02,896] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 +[2024-03-08 23:07:02,899] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition +[2024-03-08 23:07:02,900] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always +[2024-03-08 23:07:02,900] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always +[2024-03-08 23:07:02,900] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always +[2024-03-08 23:07:02,900] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always +[2024-03-08 23:07:02,901] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql +[2024-03-08 23:07:02,901] kopf.objects [INFO ] Base ServerId: 1000 +[2024-03-08 23:07:02,902] kopf.objects [INFO ] Log collection: False +[2024-03-08 23:07:02,902] kopf.objects [INFO ] Router instances: 1 +[2024-03-08 23:07:02,902] kopf.objects [INFO ] Backup profiles: 1 +[2024-03-08 23:07:02,902] kopf.objects [INFO ] Backup schedules: 1 +[2024-03-08 23:07:02,903] kopf.objects [INFO ] Server.TLS.useSelfSigned: True +0. Components ConfigMaps and Secrets +0.5. Additional ConfigMaps +1. Initial Configuration ConfigMap and Container Probes +2. Cluster Accounts +3. Router Accounts +4. Cluster Service +5. Cluster ServiceAccount + Existing SA: {'api_version': 'v1', + 'automount_service_account_token': None, + 'image_pull_secrets': None, + 'kind': 'ServiceAccount', + 'metadata': {'annotations': None, + 'cluster_name': None, + 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), + 'deletion_grace_period_seconds': None, + 'deletion_timestamp': None, + 'finalizers': None, + 'generate_name': None, + 'generation': None, + 'labels': None, + 'managed_fields': [{'api_version': 'v1', + 'fields_type': 'FieldsV1', + 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, + 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, + 'manager': 'OpenAPI-Generator', + 'operation': 'Update', + 'subresource': None, + 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], + 'name': 'mysql-shared-sidecar-sa', + 'namespace': 'shared-backend', + 'owner_references': [{'api_version': 'mysql.oracle.com/v2', + 'block_owner_deletion': True, + 'controller': True, + 'kind': 'InnoDBCluster', + 'name': 'mysql-shared', + 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], + 'resource_version': '15726459', + 'self_link': None, + 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, + 'secrets': None} + ImagePullSecrets: None +6. Cluster RoleBinding +7. Cluster StatefulSet +8. Cluster PodDisruptionBudget +9. Read Replica StatefulSets + No Read Replica +10. Router Service +11. Router Deployment + Preparing... + Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} +[2024-03-08 23:07:03,063] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. +Traceback (most recent call last): + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once + result = await invoke_handler( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler + result = await invocation.invoke( + File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke + await asyncio.shield(future) # slightly expensive: creates tasks + File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run + result = self.fn(*self.args, **self.kwargs) + File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create + api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment + return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info + return self.api_client.call_api( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api + return self.__call_api(resource_path, method, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api + response_data = self.request( + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request + return self.rest_client.POST(url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST + return self.request("POST", url, + File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request + raise ApiException(http_resp=r) +kubernetes.client.exceptions.ApiException: (422) +Reason: Unprocessable Entity +HTTP response headers: HTTPHeaderDict({'Audit-Id': 'fc368e2e-0ecb-44dc-9cd7-73f4cacac374', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:07:03 GMT', 'Content-Length': '751'}) +HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} + + +[2024-03-08 23:07:03,766] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:07:03,768] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:07:13,902] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:07:13,905] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:07:24,114] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:07:24,130] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:07:34,269] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:07:34,271] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:07:44,407] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:07:44,409] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running +[2024-03-08 23:07:54,552] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules +[2024-03-08 23:07:54,557] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running From 0d323b9bd08f2b0feb09bbeff8f200fbd00dda3b Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 8 Mar 2024 20:49:56 -0500 Subject: [PATCH 07/22] temp fix image tag --- .../controller/innodbcluster/cluster_api.py | 6 +- operator-logs.log | 5467 ----------------- 2 files changed, 3 insertions(+), 5470 deletions(-) delete mode 100644 operator-logs.log diff --git a/mysqloperator/controller/innodbcluster/cluster_api.py b/mysqloperator/controller/innodbcluster/cluster_api.py index b217d6c8..3b86a0a4 100644 --- a/mysqloperator/controller/innodbcluster/cluster_api.py +++ b/mysqloperator/controller/innodbcluster/cluster_api.py @@ -1435,11 +1435,11 @@ def extra_router_volume_mounts(self) -> str: @property def router_image(self) -> str: if self.router.version: - version = self.router.version + config.IMAGE_TAG + version = self.router.version # + config.IMAGE_TAG elif self.version: - version = self.version + config.IMAGE_TAG + version = self.version # + config.IMAGE_TAG else: - version = config.DEFAULT_ROUTER_VERSION_TAG + config.IMAGE_TAG + version = config.DEFAULT_ROUTER_VERSION_TAG # + config.IMAGE_TAG image = config.MYSQL_ROUTER_IMAGE if self.edition == Edition.community else config.MYSQL_ROUTER_EE_IMAGE diff --git a/operator-logs.log b/operator-logs.log deleted file mode 100644 index 62e1a7bc..00000000 --- a/operator-logs.log +++ /dev/null @@ -1,5467 +0,0 @@ -2024-03-08 22:16:46: Info: mysqlsh Ver 8.3.0 for Linux on aarch64 - for MySQL 8.3.0 (MySQL Community Server (GPL)) - build 13725054 - commit_id b871a975f78bf8d8cafe15536b5a6e1507c090c7 - product_id el8-arm-64bit rpm -2024-03-08 22:16:46: Info: Using credential store helper: /usr/bin/mysql-secret-store-login-path -2024-03-08 22:16:46: Info: Loading startup files... -2024-03-08 22:16:46: Info: Loading plugins... -[2024-03-08 22:16:48,835] root [INFO ] Auto-detected cluster domain: cluster.local -[2024-03-08 22:16:48,844] kopf.activities.star [INFO ] MySQL Operator/operator.py=2.1.2 timestamp=2024-03-07T17:29:23 kopf=1.35.4 uid=2 -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] KUBERNETES_VERSION =1.28 -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] OPERATOR_VERSION =2.1.2 -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] OPERATOR_EDITION =community -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] OPERATOR_EDITIONS =['community', 'enterprise'] -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] SHELL_VERSION =8.3.0 -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] DEFAULT_VERSION_TAG=8.3.0 -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] SIDECAR_VERSION_TAG=8.3.0-2.1.2 -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] DEFAULT_IMAGE_REPOSITORY =container-registry.oracle.com/mysql -[2024-03-08 22:16:48,858] kopf.activities.star [INFO ] ARCH =arm64 -[2024-03-08 22:16:48,879] kopf.activities.star [INFO ] Checking operator version for backup schedule shared-backend/mysql-shared/daily-backup-objstore -[2024-03-08 22:16:48,894] kopf.activities.star [WARNING ] Error while ensuring shared-backend/mysql-shared uses current operator version for scheduled backups: (404) -Reason: Not Found -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'e4c2e98a-9553-45a0-8eaa-db99cea40c31', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:16:48 GMT', 'Content-Length': '272'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"cronjobs.batch \"mysql-shared-daily-backup-objstore-cb\" not found","reason":"NotFound","details":{"name":"mysql-shared-daily-backup-objstore-cb","group":"batch","kind":"cronjobs"},"code":404} - - -[2024-03-08 22:16:48,908] kopf.activities.star [INFO ] Activity 'on_startup' succeeded. -[2024-03-08 22:16:48,909] kopf._core.engines.a [INFO ] Initial authentication has been initiated. -[2024-03-08 22:16:48,911] kopf.activities.auth [INFO ] Activity 'login_via_client' succeeded. -[2024-03-08 22:16:48,912] kopf._core.engines.a [INFO ] Initial authentication has finished. -[2024-03-08 22:16:49,074] kopf._core.engines.p [INFO ] Resuming operations after the pause. Conflicting operators with the same priority are gone. -[2024-03-08 22:16:49,194] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:16:49,195] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:16:49,196] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:16:49,196] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:16:49,197] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:16:49,197] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:16:49,197] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:16:49,198] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:16:49,198] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:16:49,199] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:16:49,200] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:16:49,200] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:16:49,200] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets - Creating CM mysql-shared-componentconf ... -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes - Preparing... - Creating... -2. Cluster Accounts - Preparing... - Creating... -3. Router Accounts - Preparing... - Creating... -4. Cluster Service - Preparing... - Creating Service mysql-shared-instances... -5. Cluster ServiceAccount - Existing SA: None - ImagePullSecrets: None - Preparing... - Creating...{'apiVersion': 'v1', 'kind': 'ServiceAccount', 'metadata': {'name': 'mysql-shared-sidecar-sa', 'namespace': 'shared-backend'}} -6. Cluster RoleBinding - Preparing... - Creating RoleBinding mysql-shared-sidecar-rb ... -7. Cluster StatefulSet - Preparing... - Adding keyring bits - Adding podSpec - Creating...{'apiVersion': 'apps/v1', 'kind': 'StatefulSet', 'metadata': {'name': 'mysql-shared', 'labels': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'mysql.oracle.com/instance-type': 'group-member', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared', 'app.kubernetes.io/component': 'database', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceName': 'mysql-shared-instances', 'replicas': 3, 'podManagementPolicy': 'Parallel', 'selector': {'matchLabels': {'component': 'mysqld', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'mysql.oracle.com/instance-type': 'group-member', 'app.kubernetes.io/name': 'mysql-innodbcluster-mysql-server', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-mysql-server', 'app.kubernetes.io/component': 'database', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqld', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'mysql.oracle.com/instance-type': 'group-member', 'app.kubernetes.io/name': 'mysql-innodbcluster-mysql-server', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-mysql-server', 'app.kubernetes.io/component': 'database', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'subdomain': 'mysql-shared', 'readinessGates': [{'conditionType': 'mysql.oracle.com/configured'}, {'conditionType': 'mysql.oracle.com/ready'}], 'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 27, 'runAsGroup': 27, 'fsGroup': 27}, 'terminationGracePeriodSeconds': 120, 'initContainers': [{'name': 'fixdatadir', 'image': 'container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64', 'imagePullPolicy': 'Always', 'command': ['bash', '-c', 'chown 27:27 /var/lib/mysql && chmod 0700 /var/lib/mysql'], 'securityContext': {'runAsUser': 0, 'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'add': ['CHOWN', 'FOWNER'], 'drop': ['ALL']}}, 'volumeMounts': [{'name': 'datadir', 'mountPath': '/var/lib/mysql'}], 'env': [{'name': 'MYSQL_OPERATOR_K8S_CLUSTER_DOMAIN', 'value': 'cluster.local'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}]}, {'name': 'initconf', 'image': 'container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64', 'imagePullPolicy': 'Always', 'command': ['mysqlsh', '--log-level=@INFO', '--pym', 'mysqloperator', 'init', '--pod-name', '$(POD_NAME)', '--pod-namespace', '$(POD_NAMESPACE)', '--datadir', '/var/lib/mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'POD_NAME', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.name'}}}, {'name': 'POD_NAMESPACE', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.namespace'}}}, {'name': 'MYSQL_OPERATOR_K8S_CLUSTER_DOMAIN', 'value': 'cluster.local'}, {'name': 'MYSQLSH_USER_CONFIG_HOME', 'value': '/tmp'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}], 'volumeMounts': [{'name': 'initconfdir', 'mountPath': '/mnt/initconf', 'readOnly': True}, {'name': 'datadir', 'mountPath': '/var/lib/mysql'}, {'name': 'mycnfdata', 'mountPath': '/mnt/mycnfdata'}, {'name': 'initconf-tmp', 'mountPath': '/tmp'}]}, {'name': 'initmysql', 'image': 'container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64', 'imagePullPolicy': 'Always', 'args': ['mysqld', '--user=mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_INITIALIZE_ONLY', 'value': '1'}, {'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-passwords', 'key': 'rootPassword'}}}, {'name': 'MYSQLSH_USER_CONFIG_HOME', 'value': '/tmp'}], 'volumeMounts': [{'name': 'datadir', 'mountPath': '/var/lib/mysql'}, {'name': 'rundir', 'mountPath': '/var/run/mysqld'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf.d', 'subPath': 'my.cnf.d'}, {'name': 'mycnfdata', 'mountPath': '/docker-entrypoint-initdb.d', 'subPath': 'docker-entrypoint-initdb.d'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf', 'subPath': 'my.cnf'}, {'name': 'initmysql-tmp', 'mountPath': '/tmp'}, {'name': 'varlibmysqlfiles', 'mountPath': '/var/lib/mysql-files'}, {'name': 'globalcomponentconf', 'mountPath': '/usr/sbin/mysqld.my', 'subPath': 'mysqld.my'}, {'name': 'ocikey', 'mountPath': '/.oci'}, {'name': 'keyringfile-conf', 'mountPath': '/usr/lib64/mysql/plugin/component_keyring_oci.cnf', 'subPath': 'component_keyring_oci.cnf'}]}], 'containers': [{'name': 'sidecar', 'image': 'container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64', 'imagePullPolicy': 'Always', 'command': ['mysqlsh', '--pym', 'mysqloperator', 'sidecar', '--pod-name', '$(POD_NAME)', '--pod-namespace', '$(POD_NAMESPACE)', '--datadir', '/var/lib/mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'POD_NAME', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.name'}}}, {'name': 'POD_NAMESPACE', 'valueFrom': {'fieldRef': {'fieldPath': 'metadata.namespace'}}}, {'name': 'MYSQL_UNIX_PORT', 'value': '/var/run/mysqld/mysql.sock'}, {'name': 'MYSQLSH_USER_CONFIG_HOME', 'value': '/mysqlsh'}, {'name': 'MYSQL_OPERATOR_K8S_CLUSTER_DOMAIN', 'value': 'cluster.local'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}], 'volumeMounts': [{'name': 'rundir', 'mountPath': '/var/run/mysqld'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf.d', 'subPath': 'my.cnf.d'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf', 'subPath': 'my.cnf'}, {'name': 'shellhome', 'mountPath': '/mysqlsh'}, {'name': 'sidecar-tmp', 'mountPath': '/tmp'}]}, {'name': 'mysql', 'image': 'container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64', 'imagePullPolicy': 'always', 'args': ['mysqld', '--user=mysql'], 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'lifecycle': {'preStop': {'exec': {'command': ['sh', '-c', 'sleep 60 && mysqladmin -ulocalroot shutdown']}}}, 'startupProbe': {'exec': {'command': ['/livenessprobe.sh', '8']}, 'initialDelaySeconds': 5, 'periodSeconds': 3, 'failureThreshold': 10000, 'successThreshold': 1, 'timeout': 2}, 'readinessProbe': {'exec': {'command': ['/readinessprobe.sh']}, 'periodSeconds': 5, 'initialDelaySeconds': 10, 'failureThreshold': 10000}, 'livenessProbe': {'exec': {'command': ['/livenessprobe.sh']}, 'initialDelaySeconds': 15, 'periodSeconds': 15, 'failureThreshold': 10, 'successThreshold': 1, 'timeout': 5}, 'env': [{'name': 'MYSQL_UNIX_PORT', 'value': '/var/run/mysqld/mysql.sock'}, {'name': 'MYSQLSH_CREDENTIAL_STORE_SAVE_PASSWORDS', 'value': 'never'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}, {'containerPort': 33060, 'name': 'mysqlx'}, {'containerPort': 33061, 'name': 'gr-xcom'}], 'volumeMounts': [{'name': 'datadir', 'mountPath': '/var/lib/mysql'}, {'name': 'rundir', 'mountPath': '/var/run/mysqld'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf.d', 'subPath': 'my.cnf.d'}, {'name': 'mycnfdata', 'mountPath': '/etc/my.cnf', 'subPath': 'my.cnf'}, {'name': 'initconfdir', 'mountPath': '/livenessprobe.sh', 'subPath': 'livenessprobe.sh'}, {'name': 'initconfdir', 'mountPath': '/readinessprobe.sh', 'subPath': 'readinessprobe.sh'}, {'name': 'varlibmysqlfiles', 'mountPath': '/var/lib/mysql-files'}, {'name': 'mysql-tmp', 'mountPath': '/tmp'}, {'name': 'globalcomponentconf', 'mountPath': '/usr/sbin/mysqld.my', 'subPath': 'mysqld.my'}, {'name': 'ocikey', 'mountPath': '/.oci'}, {'name': 'keyringfile-conf', 'mountPath': '/usr/lib64/mysql/plugin/component_keyring_oci.cnf', 'subPath': 'component_keyring_oci.cnf'}], 'resources': {'limits': {'cpu': '300m', 'memory': '5120Mi'}, 'requests': {'cpu': '100m', 'memory': '1024Mi'}}}], 'volumes': [{'name': 'mycnfdata', 'emptyDir': {}}, {'name': 'rundir', 'emptyDir': {}}, {'name': 'varlibmysqlfiles', 'emptyDir': {}}, {'name': 'initconfdir', 'configMap': {'name': 'mysql-shared-initconf', 'defaultMode': 493}}, {'name': 'shellhome', 'emptyDir': {}}, {'name': 'initconf-tmp', 'emptyDir': {}}, {'name': 'initmysql-tmp', 'emptyDir': {}}, {'name': 'mysql-tmp', 'emptyDir': {}}, {'name': 'sidecar-tmp', 'emptyDir': {}}, {'name': 'globalcomponentconf', 'configMap': {'name': 'mysql-shared-componentconf', 'items': [{'key': 'mysqld.my', 'path': 'mysqld.my'}]}}, {'name': 'ocikey', 'secret': {'secretName': 'oci-oke-service-account'}}, {'name': 'keyringfile-conf', 'configMap': {'name': 'mysql-shared-componentconf', 'items': [{'key': 'component_keyring_oci.cnf', 'path': 'component_keyring_oci.cnf'}]}}]}}, 'volumeClaimTemplates': [{'metadata': {'name': 'datadir'}, 'spec': {'accessModes': ['ReadWriteOnce'], 'resources': {'requests': {'storage': '2Gi'}}}}]}} -8. Cluster PodDisruptionBudget - Preparing... - Creating... -9. Read Replica StatefulSets - No Read Replica -10. Router Service - Preparing... - Creating... -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:16:49,788] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '9f56e3f6-33e6-4050-80d7-1587e2a45548', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:16:49 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:16:49,937] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:16:49,940] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:17:00,089] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:17:00,092] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:17:10,229] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:17:10,232] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:17:20,368] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:17:20,371] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:17:30,512] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:17:30,515] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:17:40,648] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:17:40,655] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:17:49,941] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:17:49,944] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:17:49,944] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:17:49,945] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:17:49,945] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:17:49,945] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:17:49,945] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:17:49,946] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:17:49,946] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:17:49,946] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:17:49,947] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:17:49,947] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:17:49,947] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:17:50,052] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '2b572cf2-4c80-4560-abe3-f4b31bba4e61', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:17:50 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:17:50,788] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:17:50,790] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:18:00,950] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:18:00,955] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:18:11,104] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:18:11,109] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:18:21,249] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:18:21,252] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:18:31,392] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:18:31,395] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:18:41,532] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:18:41,534] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:18:50,205] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:18:50,208] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:18:50,209] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:18:50,209] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:18:50,209] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:18:50,210] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:18:50,210] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:18:50,210] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:18:50,211] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:18:50,211] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:18:50,211] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:18:50,212] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:18:50,212] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:18:50,310] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '6f1534a5-2aa8-4f1a-a6fb-3a417d1083db', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:18:50 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:18:51,669] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:18:51,671] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:19:01,809] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:19:01,814] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:19:11,953] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:19:11,957] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:19:22,099] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:19:22,102] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:19:32,235] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:19:32,238] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:19:42,390] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:19:42,392] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:19:50,458] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:19:50,460] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:19:50,461] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:19:50,461] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:19:50,462] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:19:50,462] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:19:50,463] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:19:50,463] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:19:50,463] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:19:50,463] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:19:50,464] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:19:50,464] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:19:50,464] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:19:50,580] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '4af76bd8-7b15-4d7f-834b-c01287f8c587', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:19:50 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:19:52,527] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:19:52,530] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:20:02,672] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:20:02,677] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:20:12,815] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:20:12,818] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:20:22,956] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:20:22,959] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:20:33,101] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:20:33,109] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:20:43,248] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:20:43,251] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:20:50,720] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:20:50,722] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:20:50,723] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:20:50,724] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:20:50,724] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:20:50,724] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:20:50,725] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:20:50,725] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:20:50,725] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:20:50,726] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:20:50,726] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:20:50,726] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:20:50,727] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:20:50,834] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '261f4dba-b578-44c7-a970-7997052c1d96', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:20:50 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:20:53,419] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:20:53,424] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:21:03,579] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:21:03,583] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:21:13,721] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:21:13,724] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:21:23,862] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:21:23,867] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:21:34,023] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:21:34,029] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:21:44,169] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:21:44,171] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:21:50,998] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:21:51,001] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:21:51,001] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:21:51,002] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:21:51,002] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:21:51,002] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:21:51,003] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:21:51,004] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:21:51,004] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:21:51,004] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:21:51,005] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:21:51,005] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:21:51,005] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:21:51,112] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '4dd0f3ab-a5e0-4174-b000-03169baef6a0', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:21:51 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:21:54,328] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:21:54,333] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:22:04,470] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:22:04,472] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:22:14,613] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:22:14,616] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:22:24,761] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:22:24,765] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:22:34,904] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:22:34,906] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:22:45,044] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:22:45,047] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:22:51,250] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:22:51,252] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:22:51,253] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:22:51,253] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:22:51,254] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:22:51,254] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:22:51,254] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:22:51,255] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:22:51,255] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:22:51,255] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:22:51,256] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:22:51,256] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:22:51,256] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:22:51,368] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '9df110f6-688a-4682-b484-5d30237d5fe7', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:22:51 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:22:55,184] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:22:55,190] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:23:05,328] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:23:05,331] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:23:15,471] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:23:15,473] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:23:25,617] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:23:25,623] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:23:35,760] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:23:35,762] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:23:45,900] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:23:45,903] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:23:51,506] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:23:51,508] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:23:51,509] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:23:51,510] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:23:51,510] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:23:51,510] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:23:51,511] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:23:51,511] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:23:51,511] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:23:51,512] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:23:51,512] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:23:51,512] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:23:51,513] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:23:51,676] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '8955a109-75c5-4867-9eff-97531dd2309b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:23:51 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:23:56,105] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:23:56,113] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:24:06,249] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:24:06,252] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:24:16,387] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:24:16,390] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:24:26,561] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:24:26,567] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:24:36,720] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:24:36,723] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:24:46,858] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:24:46,860] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:24:51,817] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:24:51,820] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:24:51,820] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:24:51,820] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:24:51,820] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:24:51,821] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:24:51,821] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:24:51,821] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:24:51,822] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:24:51,822] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:24:51,822] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:24:51,823] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:24:51,823] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:24:51,920] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '05427c06-0528-4f22-9f8b-0782e79cc031', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:24:51 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:24:57,018] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:24:57,026] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:25:07,161] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:25:07,164] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:25:17,308] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:25:17,310] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:25:27,446] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:25:27,449] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:25:37,584] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:25:37,587] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:25:47,723] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:25:47,725] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:25:52,063] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:25:52,064] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:25:52,065] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:25:52,066] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:25:52,066] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:25:52,066] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:25:52,066] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:25:52,067] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:25:52,067] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:25:52,067] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:25:52,068] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:25:52,068] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:25:52,068] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:25:52,164] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'd0352b7a-658d-4837-8e75-ce5d683afd64', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:25:52 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:25:57,861] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:25:57,864] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:26:07,999] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:26:08,002] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:26:18,146] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:26:18,148] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:26:28,285] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:26:28,287] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:26:38,430] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:26:38,432] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:26:48,574] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:26:48,576] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:26:52,306] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:26:52,308] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:26:52,308] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:26:52,309] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:26:52,309] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:26:52,309] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:26:52,310] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:26:52,310] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:26:52,310] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:26:52,311] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:26:52,311] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:26:52,311] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:26:52,311] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:26:52,413] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '72044adb-ee3d-4d8f-a17a-cc9ad3c0c541', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:26:52 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:26:58,721] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:26:58,724] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:27:08,872] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:27:08,879] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:27:19,018] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:27:19,020] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:27:29,157] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:27:29,160] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:27:39,304] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:27:39,308] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:27:49,459] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:27:49,464] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:27:52,555] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:27:52,558] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:27:52,558] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:27:52,558] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:27:52,559] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:27:52,559] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:27:52,559] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:27:52,560] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:27:52,560] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:27:52,560] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:27:52,561] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:27:52,561] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:27:52,561] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:27:52,654] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '791d5fa4-ddd7-465e-b532-d2e7ac67304e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:27:52 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:27:59,622] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:27:59,626] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:28:09,762] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:28:09,764] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:28:19,907] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:28:19,909] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:28:30,060] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:28:30,064] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:28:40,199] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:28:40,202] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:28:50,339] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:28:50,341] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:28:52,794] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:28:52,796] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:28:52,796] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:28:52,797] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:28:52,797] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:28:52,797] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:28:52,798] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:28:52,798] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:28:52,798] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:28:52,799] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:28:52,799] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:28:52,799] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:28:52,799] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:28:52,894] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '3d28fe94-1737-4285-a3d6-317b8f78b016', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:28:52 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:29:00,481] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:29:00,483] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:29:10,621] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:29:10,626] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:29:20,762] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:29:20,765] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:29:30,899] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:29:30,902] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:29:41,036] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:29:41,038] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:29:51,180] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:29:51,183] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:29:53,031] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:29:53,033] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:29:53,034] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:29:53,034] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:29:53,034] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:29:53,035] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:29:53,035] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:29:53,035] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:29:53,035] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:29:53,036] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:29:53,036] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:29:53,036] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:29:53,037] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:29:53,129] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '8e32b43c-3e3c-4756-bddd-6b2f160322c2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:29:53 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:30:01,324] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:30:01,326] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:30:11,469] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:30:11,472] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:30:21,607] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:30:21,609] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:30:31,751] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:30:31,754] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:30:41,889] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:30:41,892] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:30:52,028] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:30:52,031] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:30:53,267] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:30:53,269] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:30:53,270] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:30:53,270] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:30:53,270] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:30:53,271] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:30:53,271] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:30:53,271] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:30:53,271] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:30:53,272] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:30:53,272] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:30:53,272] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:30:53,273] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:30:53,383] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b14509e8-5ef9-46bf-86a3-fc75a968be11', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:30:53 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:31:02,172] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:31:02,175] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:31:12,315] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:31:12,318] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:31:22,468] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:31:22,470] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:31:32,613] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:31:32,616] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:31:42,750] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:31:42,752] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:31:52,912] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:31:52,915] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:31:53,529] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -0. Components ConfigMaps and Secrets -[2024-03-08 22:31:53,541] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:31:53,541] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:31:53,543] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:31:53,544] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:31:53,544] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:31:53,544] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:31:53,544] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:31:53,545] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:31:53,545] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:31:53,545] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:31:53,546] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:31:53,546] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:31:53,696] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '157d0317-5da3-40f5-92bc-861780511710', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:31:53 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:32:03,067] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:32:03,071] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:32:13,211] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:32:13,213] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:32:23,348] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:32:23,351] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:32:33,484] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:32:33,487] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:32:43,623] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:32:43,625] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:32:53,768] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:32:53,773] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:32:53,775] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:32:53,775] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:32:53,775] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:32:53,775] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:32:53,777] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:32:53,777] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:32:53,777] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:32:53,778] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:32:53,779] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:32:53,779] kopf.objects [INFO ] Backup schedules: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:32:53,780] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:32:53,918] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b8996f72-6690-4eba-a2a1-6e29e1371018', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:32:53 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:32:54,052] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:32:54,057] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:33:04,190] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:33:04,193] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:33:14,328] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:33:14,331] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:33:24,468] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:33:24,473] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:33:34,641] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:33:34,644] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:33:44,779] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:33:44,782] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:33:54,064] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:33:54,069] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:33:54,071] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:33:54,071] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:33:54,071] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:33:54,071] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:33:54,073] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:33:54,073] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:33:54,073] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:33:54,073] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:33:54,074] kopf.objects [INFO ] Backup profiles: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:33:54,078] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:33:54,080] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:33:54,217] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '13e96880-613a-44f9-a620-00fb13f8c941', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:33:54 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:33:54,916] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:33:54,921] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:34:05,066] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:34:05,069] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:34:15,203] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:34:15,205] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:34:25,339] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:34:25,342] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:34:35,483] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:34:35,485] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:34:45,622] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:34:45,626] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:34:54,366] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:34:54,370] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:34:54,371] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:34:54,371] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:34:54,371] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:34:54,371] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:34:54,373] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:34:54,373] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:34:54,373] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:34:54,373] kopf.objects [INFO ] Router instances: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:34:54,375] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:34:54,375] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:34:54,375] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:34:54,521] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a5380698-7082-4d27-a75e-374843c20d8b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:34:54 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:34:55,765] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:34:55,770] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:35:05,912] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:35:05,915] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:35:16,049] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:35:16,051] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:35:26,224] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:35:26,227] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:35:36,386] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:35:36,390] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:35:46,523] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:35:46,526] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:35:54,709] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:35:54,716] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:35:54,716] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:35:54,716] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:35:54,718] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:35:54,718] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:35:54,718] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:35:54,723] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:35:54,723] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:35:54,724] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:35:54,724] kopf.objects [INFO ] Backup profiles: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:35:54,724] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:35:54,725] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:35:54,862] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'dec9afb6-110c-4708-a5cf-715d3ec5c37c', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:35:54 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:35:56,662] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:35:56,664] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:36:06,804] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:36:06,808] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:36:16,942] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:36:16,945] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:36:27,091] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:36:27,094] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:36:37,229] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:36:37,231] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:36:47,371] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:36:47,373] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:36:55,054] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:36:55,056] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:36:55,057] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:36:55,057] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:36:55,057] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:36:55,058] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:36:55,058] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:36:55,058] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:36:55,058] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:36:55,059] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:36:55,059] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:36:55,059] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:36:55,060] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:36:55,163] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '5d05e74f-22ac-4fa7-a150-884b4548d1e5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:36:55 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:36:57,508] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:36:57,510] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:37:07,646] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:37:07,648] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:37:17,789] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:37:17,792] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:37:27,931] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:37:27,933] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:37:38,069] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:37:38,071] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:37:48,205] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:37:48,207] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:37:55,319] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:37:55,323] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:37:55,325] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:37:55,325] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:37:55,326] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:37:55,326] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:37:55,327] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:37:55,327] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:37:55,327] kopf.objects [INFO ] Log collection: False -0. Components ConfigMaps and Secrets -[2024-03-08 22:37:55,328] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:37:55,329] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:37:55,329] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:37:55,329] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:37:55,478] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a98fc560-0480-49c4-ae87-2d0946ed9852', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:37:55 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:37:58,345] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:37:58,347] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:38:08,492] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:38:08,494] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:38:18,641] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:38:18,643] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:38:28,780] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:38:28,783] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:38:38,920] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:38:38,922] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:38:49,057] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:38:49,059] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:38:55,624] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:38:55,629] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:38:55,631] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:38:55,631] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:38:55,631] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:38:55,632] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:38:55,632] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:38:55,633] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:38:55,633] kopf.objects [INFO ] Log collection: False -0. Components ConfigMaps and Secrets -[2024-03-08 22:38:55,634] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:38:55,634] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:38:55,634] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:38:55,635] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:38:55,774] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '1fa5ef80-c67a-4a0d-8c97-f5ef18481a2a', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:38:55 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:38:59,194] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:38:59,197] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:39:09,344] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:39:09,347] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:39:19,485] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:39:19,488] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:39:29,630] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:39:29,633] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:39:39,783] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:39:39,792] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:39:49,938] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:39:49,940] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:39:55,951] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:39:55,958] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:39:55,960] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:39:55,960] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:39:55,960] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:39:55,960] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:39:55,960] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:39:55,965] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:39:55,966] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:39:55,967] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:39:55,967] kopf.objects [INFO ] Backup profiles: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:39:55,968] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:39:55,971] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:39:56,106] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ae5137a3-2089-42dc-8e5c-a6d2a6014f76', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:39:56 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:40:00,079] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:40:00,081] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:40:10,216] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:40:10,222] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:40:20,358] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:40:20,360] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:40:30,496] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:40:30,499] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:40:40,639] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:40:40,642] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:40:50,777] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:40:50,779] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:40:56,257] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:40:56,261] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:40:56,263] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:40:56,263] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:40:56,263] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:40:56,264] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:40:56,264] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:40:56,265] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:40:56,266] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:40:56,266] kopf.objects [INFO ] Router instances: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:40:56,266] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:40:56,271] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:40:56,272] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:40:56,411] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '7b7683ef-6de2-43f6-ae3c-129406ad5cb2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:40:56 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:41:00,915] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:41:00,917] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:41:11,053] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:41:11,056] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:41:21,189] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:41:21,192] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:41:31,338] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:41:31,341] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:41:41,478] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:41:41,482] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:41:51,629] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:41:51,631] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:41:56,554] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:41:56,557] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:41:56,557] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:41:56,558] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:41:56,558] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:41:56,558] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:41:56,559] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:41:56,559] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:41:56,559] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:41:56,559] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:41:56,560] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:41:56,560] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:41:56,560] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:41:56,676] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'f083c4e4-272a-4195-8862-15b9d575cb3e', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:41:56 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:42:01,769] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:42:01,771] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:42:11,905] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:42:11,907] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:42:22,046] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:42:22,050] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:42:32,195] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:42:32,198] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:42:42,332] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:42:42,334] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:42:52,478] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:42:52,480] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:42:56,815] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:42:56,816] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:42:56,817] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:42:56,818] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:42:56,818] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:42:56,818] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:42:56,819] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:42:56,819] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:42:56,819] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:42:56,819] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:42:56,820] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:42:56,820] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:42:56,820] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:42:56,915] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b43c3109-22d7-4ea0-addf-a3d4bce7d6a1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:42:56 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:43:02,612] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:43:02,614] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:43:12,753] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:43:12,757] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:43:22,891] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:43:22,894] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:43:33,031] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:43:33,033] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:43:43,185] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:43:43,190] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:43:53,346] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:43:53,350] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:43:57,074] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:43:57,078] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:43:57,078] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:43:57,078] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:43:57,079] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:43:57,079] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:43:57,079] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:43:57,080] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:43:57,080] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:43:57,080] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:43:57,081] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:43:57,081] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:43:57,081] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:43:57,175] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '64eb7ce0-eaa4-4ee8-86b6-02e9dbdec601', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:43:57 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:44:03,483] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:44:03,485] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:44:13,634] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:44:13,637] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:44:23,779] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:44:23,784] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:44:33,918] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:44:33,921] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:44:44,064] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:44:44,067] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:44:54,203] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:44:54,208] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:44:57,315] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:44:57,318] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:44:57,320] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:44:57,320] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:44:57,320] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:44:57,321] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:44:57,322] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:44:57,322] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:44:57,322] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:44:57,322] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:44:57,323] kopf.objects [INFO ] Backup profiles: 1 -0. Components ConfigMaps and Secrets -[2024-03-08 22:44:57,325] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:44:57,329] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:44:57,463] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b2f4dc5e-d8e7-4218-9f22-040103e8bfed', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:44:57 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:45:04,389] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:45:04,391] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:45:14,530] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:45:14,533] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:45:24,668] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:45:24,671] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:45:34,815] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:45:34,817] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:45:44,952] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:45:44,956] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:45:55,090] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:45:55,097] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:45:57,603] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:45:57,606] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:45:57,607] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:45:57,608] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:45:57,608] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:45:57,608] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:45:57,608] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:45:57,609] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:45:57,609] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:45:57,609] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:45:57,609] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:45:57,610] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:45:57,611] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:45:57,707] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '2bd4d8a7-a359-4988-9985-0261a3942cf1', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:45:57 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:46:05,236] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:46:05,238] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:46:15,388] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:46:15,390] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:46:25,529] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:46:25,533] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:46:35,685] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:46:35,687] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:46:45,822] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:46:45,825] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:46:56,000] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:46:56,007] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:46:57,849] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:46:57,851] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:46:57,852] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:46:57,852] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:46:57,852] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:46:57,852] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:46:57,853] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:46:57,853] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:46:57,854] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:46:57,854] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:46:57,854] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:46:57,854] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:46:57,855] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:46:57,952] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '505596ef-b130-425e-83bd-bfa76efc0f51', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:46:57 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:47:06,150] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:47:06,152] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:47:16,297] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:47:16,301] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:47:26,445] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:47:26,450] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:47:36,585] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:47:36,589] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:47:46,726] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:47:46,729] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:47:56,872] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:47:56,880] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:47:58,091] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:47:58,093] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:47:58,094] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:47:58,094] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:47:58,095] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:47:58,095] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:47:58,095] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:47:58,096] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:47:58,096] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:47:58,096] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:47:58,096] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:47:58,097] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:47:58,097] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:47:58,191] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '1dd4a88f-b56c-44b6-b00d-8336cb964bb2', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:47:58 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:48:07,018] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:48:07,020] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:48:17,160] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:48:17,162] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:48:27,294] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:48:27,297] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:48:37,446] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:48:37,448] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:48:47,591] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:48:47,594] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:48:57,739] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:48:57,742] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:48:58,330] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:48:58,332] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:48:58,332] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:48:58,333] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:48:58,333] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:48:58,333] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:48:58,334] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:48:58,334] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:48:58,334] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:48:58,334] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:48:58,335] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:48:58,335] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:48:58,335] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:48:58,430] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '34f5019d-65f7-4f65-bf19-b7bd62cc69be', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:48:58 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:49:07,877] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:49:07,879] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:49:18,019] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:49:18,026] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:49:28,165] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:49:28,168] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:49:38,303] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:49:38,305] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:49:48,439] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:49:48,441] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:49:58,580] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:49:58,583] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:49:58,584] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:49:58,584] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:49:58,584] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:49:58,585] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:49:58,585] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:49:58,585] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:49:58,586] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:49:58,586] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:49:58,586] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:49:58,587] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:49:58,587] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:49:58,680] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ee8ac3e5-37a1-48c7-ad19-26211de66637', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:49:58 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:49:58,814] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:49:58,816] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:50:08,953] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:50:08,958] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:50:19,093] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:50:19,095] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:50:29,250] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:50:29,253] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:50:39,403] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:50:39,407] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:50:49,544] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:50:49,547] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:50:58,833] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:50:58,835] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:50:58,836] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:50:58,836] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:50:58,836] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:50:58,837] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:50:58,837] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:50:58,837] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:50:58,838] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:50:58,838] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:50:58,838] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:50:58,839] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:50:58,839] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:50:58,938] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '4becbf27-3b01-4703-9680-55ac1c0384f0', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:50:58 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:50:59,682] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:50:59,684] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:51:09,819] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:51:09,821] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:51:19,959] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:51:19,961] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:51:30,100] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:51:30,102] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:51:40,245] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:51:40,247] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:51:50,386] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:51:50,388] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:51:59,079] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:51:59,081] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:51:59,081] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:51:59,082] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:51:59,082] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:51:59,082] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:51:59,083] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:51:59,083] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:51:59,083] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:51:59,084] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:51:59,084] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:51:59,084] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:51:59,084] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:51:59,189] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '076f70eb-d16c-443d-ae74-243a5116f5c5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:51:59 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:52:00,522] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:52:00,524] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:52:10,666] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:52:10,672] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:52:20,817] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:52:20,819] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:52:30,969] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:52:30,972] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:52:41,111] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:52:41,113] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:52:51,248] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:52:51,251] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:52:59,331] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:52:59,334] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:52:59,335] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:52:59,335] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:52:59,335] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:52:59,336] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:52:59,336] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:52:59,336] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:52:59,336] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:52:59,337] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:52:59,337] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:52:59,338] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:52:59,338] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:52:59,431] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'b9cb44e4-8713-478b-b172-2e69aa5e426c', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:52:59 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:53:01,386] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:53:01,388] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:53:11,527] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:53:11,529] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:53:21,665] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:53:21,668] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:53:31,808] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:53:31,811] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:53:41,949] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:53:41,956] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:53:52,096] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:53:52,098] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:53:59,595] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:53:59,598] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:53:59,599] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:53:59,599] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:53:59,599] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:53:59,599] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:53:59,600] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:53:59,600] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:53:59,601] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:53:59,601] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:53:59,601] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:53:59,601] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:53:59,602] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:53:59,702] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '6530ad6a-77d1-4c92-b574-b0b562c37cac', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:53:59 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:54:02,232] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:54:02,235] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:54:12,373] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:54:12,375] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:54:22,525] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:54:22,529] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:54:32,663] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:54:32,665] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:54:42,800] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:54:42,802] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:54:52,936] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:54:52,938] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:54:59,842] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:54:59,844] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:54:59,845] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:54:59,845] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:54:59,846] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:54:59,846] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:54:59,846] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:54:59,847] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:54:59,847] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:54:59,847] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:54:59,848] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:54:59,848] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:54:59,848] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:54:59,941] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '6b179ee6-028e-4ec7-97ec-4fffc2faa620', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:54:59 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:55:03,076] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:55:03,081] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:55:13,218] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:55:13,221] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:55:23,376] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:55:23,379] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:55:33,513] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:55:33,515] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:55:43,671] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:55:43,674] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:55:53,808] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:55:53,811] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:56:00,082] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:56:00,084] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:56:00,085] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:56:00,086] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:56:00,086] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:56:00,086] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:56:00,087] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:56:00,087] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:56:00,087] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:56:00,087] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:56:00,088] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:56:00,088] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:56:00,088] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:56:00,184] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '5d4e592a-1382-4c24-8f98-4a41947457f5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:56:00 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:56:03,944] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:56:03,946] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:56:14,080] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:56:14,083] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:56:24,222] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:56:24,227] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:56:34,384] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:56:34,387] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:56:44,529] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:56:44,533] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:56:54,675] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:56:54,679] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:57:00,341] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:57:00,343] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:57:00,344] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:57:00,344] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:57:00,344] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:57:00,345] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:57:00,345] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:57:00,345] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:57:00,346] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:57:00,346] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:57:00,346] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:57:00,346] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:57:00,347] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:57:00,511] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '5e0a2fa2-161d-46ec-a466-248af65bfeef', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:57:00 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:57:04,820] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:57:04,822] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:57:14,966] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:57:14,968] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:57:25,142] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:57:25,148] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:57:35,284] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:57:35,286] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:57:45,444] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:57:45,448] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:57:55,585] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:57:55,587] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:58:00,660] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:58:00,663] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:58:00,664] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:58:00,664] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:58:00,664] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:58:00,664] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:58:00,665] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:58:00,665] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:58:00,666] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:58:00,666] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:58:00,666] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:58:00,667] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:58:00,667] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:58:00,768] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'cf8380b2-0d10-414f-ace6-f0812106ab84', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:58:00 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:58:05,723] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:58:05,725] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:58:15,864] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:58:15,867] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:58:26,003] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:58:26,009] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:58:36,153] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:58:36,156] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:58:46,295] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:58:46,299] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:58:56,446] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:58:56,450] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:59:00,906] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 22:59:00,908] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 22:59:00,909] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 22:59:00,909] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 22:59:00,909] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 22:59:00,910] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 22:59:00,910] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 22:59:00,910] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 22:59:00,911] kopf.objects [INFO ] Log collection: False -[2024-03-08 22:59:00,911] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 22:59:00,911] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 22:59:00,911] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 22:59:00,912] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 22:59:01,009] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '21f6568b-feb1-4e07-8fcf-74e6d252739f', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 22:59:01 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 22:59:06,595] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:59:06,598] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:59:16,735] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:59:16,737] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:59:26,881] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:59:26,884] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:59:37,045] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:59:37,053] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:59:47,195] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:59:47,198] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 22:59:57,332] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 22:59:57,335] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:00:01,147] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:00:01,149] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:00:01,150] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:00:01,150] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:00:01,150] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:00:01,151] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:00:01,151] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:00:01,151] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:00:01,152] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:00:01,152] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:00:01,152] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:00:01,152] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:00:01,153] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:00:01,259] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '71309da2-4e9b-4737-9e6b-8360277f43ca', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:00:01 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:00:07,471] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:00:07,473] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:00:17,611] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:00:17,615] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:00:27,751] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:00:27,754] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:00:37,912] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:00:37,916] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:00:48,091] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:00:48,095] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:00:58,244] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:00:58,248] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:01:01,412] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:01:01,415] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:01:01,415] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:01:01,416] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:01:01,416] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:01:01,416] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:01:01,416] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:01:01,417] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:01:01,417] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:01:01,418] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:01:01,418] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:01:01,418] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:01:01,418] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:01:01,524] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ad0b5ff9-df6c-463c-88e7-cefe136cdf57', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:01:01 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:01:08,385] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:01:08,388] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:01:18,528] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:01:18,530] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:01:28,674] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:01:28,676] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:01:38,811] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:01:38,813] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:01:48,947] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:01:48,952] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:01:59,091] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:01:59,093] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:02:01,662] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:02:01,664] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:02:01,665] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:02:01,665] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:02:01,665] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:02:01,666] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:02:01,666] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:02:01,666] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:02:01,667] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:02:01,667] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:02:01,667] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:02:01,667] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:02:01,668] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:02:01,763] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '56d9629f-4f2e-44ad-b038-feb28809b3ec', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:02:01 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:02:09,229] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:02:09,232] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:02:19,383] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:02:19,385] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:02:29,526] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:02:29,528] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:02:39,664] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:02:39,668] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:02:49,811] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:02:49,813] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:02:59,950] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:02:59,958] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:03:01,903] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:03:01,905] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:03:01,906] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:03:01,906] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:03:01,906] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:03:01,907] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:03:01,907] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:03:01,907] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:03:01,908] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:03:01,908] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:03:01,908] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:03:01,908] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:03:01,909] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:03:02,006] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'efbd80de-e34c-4f25-9426-e54f94f30d1b', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:03:01 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:03:10,100] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:03:10,102] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:03:20,243] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:03:20,246] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:03:30,383] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:03:30,386] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:03:40,519] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:03:40,521] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:03:50,655] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:03:50,657] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:04:00,875] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:04:00,880] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:04:02,149] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:04:02,151] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:04:02,152] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:04:02,152] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:04:02,153] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:04:02,153] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:04:02,153] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:04:02,154] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:04:02,154] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:04:02,154] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:04:02,155] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:04:02,155] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:04:02,155] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:04:02,253] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '65d85d41-2b8c-47ce-bc97-ab4085932550', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:04:02 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:04:11,025] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:04:11,027] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:04:21,163] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:04:21,166] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:04:31,301] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:04:31,303] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:04:41,444] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:04:41,450] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:04:51,584] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:04:51,586] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:05:01,728] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:05:01,730] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:05:02,390] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:05:02,392] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:05:02,393] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:05:02,393] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:05:02,394] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:05:02,394] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:05:02,394] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:05:02,395] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:05:02,395] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:05:02,395] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:05:02,395] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:05:02,396] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:05:02,396] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:05:02,495] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a6cfe855-db45-46e1-99dd-69991cda2941', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:05:02 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:05:11,873] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:05:11,875] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:05:22,009] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:05:22,011] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:05:32,154] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:05:32,157] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:05:42,298] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:05:42,301] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:05:52,444] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:05:52,446] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:06:02,591] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:06:02,597] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:06:02,598] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:06:02,598] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:06:02,599] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:06:02,599] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:06:02,599] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:06:02,602] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:06:02,602] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:06:02,602] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:06:02,603] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:06:02,603] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:06:02,603] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:06:02,739] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': '5655a991-bbc7-4996-8272-d4c5b34ac5f5', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:06:02 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:06:02,886] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:06:02,895] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:06:13,038] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:06:13,041] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:06:23,181] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:06:23,183] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:06:33,331] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:06:33,334] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:06:43,470] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:06:43,472] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:06:53,617] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:06:53,623] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:07:02,896] kopf.objects [INFO ] Initializing InnoDB Cluster name=mysql-shared namespace=shared-backend on K8s 1.28 -[2024-03-08 23:07:02,899] kopf.objects [INFO ] InnoDB Cluster shared-backend/mysql-shared Edition(Edition.community) Edition -[2024-03-08 23:07:02,900] kopf.objects [INFO ] Server Image: container-registry.oracle.com/mysql/community-server:8.3.0-aarch64-aarch64 / Always -[2024-03-08 23:07:02,900] kopf.objects [INFO ] Router Image: container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64 / Always -[2024-03-08 23:07:02,900] kopf.objects [INFO ] Sidecar Image: container-registry.oracle.com/mysql/community-operator:8.3.0-2.1.2arm64-aarch64 / Always -[2024-03-08 23:07:02,900] kopf.objects [INFO ] ImagePullPolicy: ImagePullPolicy.Always -[2024-03-08 23:07:02,901] kopf.objects [INFO ] ImageRepository: container-registry.oracle.com/mysql -[2024-03-08 23:07:02,901] kopf.objects [INFO ] Base ServerId: 1000 -[2024-03-08 23:07:02,902] kopf.objects [INFO ] Log collection: False -[2024-03-08 23:07:02,902] kopf.objects [INFO ] Router instances: 1 -[2024-03-08 23:07:02,902] kopf.objects [INFO ] Backup profiles: 1 -[2024-03-08 23:07:02,902] kopf.objects [INFO ] Backup schedules: 1 -[2024-03-08 23:07:02,903] kopf.objects [INFO ] Server.TLS.useSelfSigned: True -0. Components ConfigMaps and Secrets -0.5. Additional ConfigMaps -1. Initial Configuration ConfigMap and Container Probes -2. Cluster Accounts -3. Router Accounts -4. Cluster Service -5. Cluster ServiceAccount - Existing SA: {'api_version': 'v1', - 'automount_service_account_token': None, - 'image_pull_secrets': None, - 'kind': 'ServiceAccount', - 'metadata': {'annotations': None, - 'cluster_name': None, - 'creation_timestamp': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal()), - 'deletion_grace_period_seconds': None, - 'deletion_timestamp': None, - 'finalizers': None, - 'generate_name': None, - 'generation': None, - 'labels': None, - 'managed_fields': [{'api_version': 'v1', - 'fields_type': 'FieldsV1', - 'fields_v1': {'f:metadata': {'f:ownerReferences': {'.': {}, - 'k:{"uid":"5d9cdefa-b3e5-4fc8-8885-01c4e50838be"}': {}}}}, - 'manager': 'OpenAPI-Generator', - 'operation': 'Update', - 'subresource': None, - 'time': datetime.datetime(2024, 3, 8, 22, 16, 49, tzinfo=tzlocal())}], - 'name': 'mysql-shared-sidecar-sa', - 'namespace': 'shared-backend', - 'owner_references': [{'api_version': 'mysql.oracle.com/v2', - 'block_owner_deletion': True, - 'controller': True, - 'kind': 'InnoDBCluster', - 'name': 'mysql-shared', - 'uid': '5d9cdefa-b3e5-4fc8-8885-01c4e50838be'}], - 'resource_version': '15726459', - 'self_link': None, - 'uid': '95ef9d60-0843-4531-848b-5ae177f32368'}, - 'secrets': None} - ImagePullSecrets: None -6. Cluster RoleBinding -7. Cluster StatefulSet -8. Cluster PodDisruptionBudget -9. Read Replica StatefulSets - No Read Replica -10. Router Service -11. Router Deployment - Preparing... - Creating...{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mysql-shared-router', 'label': {'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-innodbcluster', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'replicas': 0, 'selector': {'matchLabels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'template': {'metadata': {'labels': {'component': 'mysqlrouter', 'tier': 'mysql', 'mysql.oracle.com/cluster': 'mysql-shared', 'app.kubernetes.io/name': 'mysql-router', 'app.kubernetes.io/instance': 'mysql-innodbcluster-mysql-shared-router', 'app.kubernetes.io/component': 'router', 'app.kubernetes.io/managed-by': 'mysql-operator', 'app.kubernetes.io/created-by': 'mysql-operator', 'kubernetes.io/arch': 'arm64'}}, 'spec': {'serviceAccountName': 'mysql-shared-sidecar-sa', 'securityContext': {'runAsUser': 999, 'runAsGroup': 999, 'fsGroup': 999}, 'containers': [{'name': 'router', 'image': 'container-registry.oracle.com/mysql/community-router:8.3.0-aarch64-aarch64-aarch64', 'imagePullPolicy': 'Always', 'securityContext': {'allowPrivilegeEscalation': False, 'privileged': False, 'readOnlyRootFilesystem': True, 'capabilities': {'drop': ['ALL']}}, 'env': [{'name': 'MYSQL_HOST', 'value': 'mysql-shared-instances.shared-backend.svc.cluster.local'}, {'name': 'MYSQL_PORT', 'value': '3306'}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerUsername'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mysql-shared-router', 'key': 'routerPassword'}}}, {'name': 'MYSQL_CREATE_ROUTER_USER', 'value': '0'}, {'name': 'MYSQL_ROUTER_BOOTSTRAP_EXTRA_OPTIONS', 'value': '--conf-set-option=DEFAULT.unknown_config_option=warning'}], 'volumeMounts': [{'name': 'tmpdir', 'mountPath': '/tmp'}], 'ports': [{'containerPort': 6446, 'name': 'mysqlrw'}, {'containerPort': 6448, 'name': 'mysqlxrw'}, {'containerPort': 6450, 'name': 'mysqlrwsplit'}, {'containerPort': 6447, 'name': 'mysqlro'}, {'containerPort': 6449, 'name': 'mysqlxro'}, {'containerPort': 8443, 'name': 'http'}], 'readinessProbe': {'exec': {'command': ['cat', '/tmp/mysqlrouter/mysqlrouter.conf']}}, 'livenessProbe': {'failureThreshold': 3, 'httpGet': {'path': '/api/20190715/swagger.json', 'port': 'http', 'scheme': 'HTTPS'}, 'periodSeconds': 10, 'successThreshold': 1, 'timeoutSeconds': 1}, 'args': ['mysqlrouter']}, {'imagePullPolicy': 'always', 'name': 'mysql-router'}], 'volumes': [{'name': 'tmpdir', 'emptyDir': {}}]}}}} -[2024-03-08 23:07:03,063] kopf.objects [ERROR ] Handler 'on_innodbcluster_create' failed with an exception. Will retry. -Traceback (most recent call last): - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 279, in execute_handler_once - result = await invoke_handler( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/execution.py", line 374, in invoke_handler - result = await invocation.invoke( - File "/usr/lib/mysqlsh/python-packages/kopf/_core/actions/invocation.py", line 139, in invoke - await asyncio.shield(future) # slightly expensive: creates tasks - File "/usr/lib64/python3.9/concurrent/futures/thread.py", line 58, in run - result = self.fn(*self.args, **self.kwargs) - File "/usr/lib/mysqlsh/python-packages/mysqloperator/controller/innodbcluster/operator_cluster.py", line 303, in on_innodbcluster_create - api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 353, in create_namespaced_deployment - return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api/apps_v1_api.py", line 452, in create_namespaced_deployment_with_http_info - return self.api_client.call_api( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 348, in call_api - return self.__call_api(resource_path, method, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 180, in __call_api - response_data = self.request( - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/api_client.py", line 391, in request - return self.rest_client.POST(url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 275, in POST - return self.request("POST", url, - File "/usr/lib/mysqlsh/python-packages/kubernetes/client/rest.py", line 234, in request - raise ApiException(http_resp=r) -kubernetes.client.exceptions.ApiException: (422) -Reason: Unprocessable Entity -HTTP response headers: HTTPHeaderDict({'Audit-Id': 'fc368e2e-0ecb-44dc-9cd7-73f4cacac374', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"metadata.label\\""', 'X-Kubernetes-Pf-Flowschema-Uid': '9416b839-bff3-431c-b701-c6f30d11ffde', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'd1432602-b91e-4428-ad3c-d4c6d66308a7', 'Date': 'Fri, 08 Mar 2024 23:07:03 GMT', 'Content-Length': '751'}) -HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Deployment.apps \"mysql-shared-router\" is invalid: [spec.template.spec.containers[1].image: Required value, spec.template.spec.containers[1].imagePullPolicy: Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"]","reason":"Invalid","details":{"name":"mysql-shared-router","group":"apps","kind":"Deployment","causes":[{"reason":"FieldValueRequired","message":"Required value","field":"spec.template.spec.containers[1].image"},{"reason":"FieldValueNotSupported","message":"Unsupported value: \"always\": supported values: \"Always\", \"IfNotPresent\", \"Never\"","field":"spec.template.spec.containers[1].imagePullPolicy"}]},"code":422} - - -[2024-03-08 23:07:03,766] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:07:03,768] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:07:13,902] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:07:13,905] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:07:24,114] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:07:24,130] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:07:34,269] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:07:34,271] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:07:44,407] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:07:44,409] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running -[2024-03-08 23:07:54,552] kopf.objects [INFO ] on_innodbcluster_field_backup_schedules -[2024-03-08 23:07:54,557] kopf.objects [ERROR ] Handler 'on_innodbcluster_field_backup_schedules/spec.backupSchedules' failed temporarily: The cluster is not ready. Will create the schedules once the first instance is up and running From 33901f05a274c96b3b7c27867fea1d4e52747ac7 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:51:10 -0500 Subject: [PATCH 08/22] hardcode imagePullPolicy because value not capitalized --- mysqloperator/controller/innodbcluster/router_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/router_objects.py b/mysqloperator/controller/innodbcluster/router_objects.py index 6de8d247..0953d77e 100644 --- a/mysqloperator/controller/innodbcluster/router_objects.py +++ b/mysqloperator/controller/innodbcluster/router_objects.py @@ -173,7 +173,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, containers: - name: router image: {spec.router_image} - imagePullPolicy: {spec.router_image_pull_policy} + imagePullPolicy: Always # Hardcoded because spec.router_image_pull_policy isn't working: {spec.router_image_pull_policy} securityContext: # These can't go to spec.template.spec.securityContext # See: https://pkg.go.dev/k8s.io/api@v0.26.1/core/v1#PodTemplateSpec / https://pkg.go.dev/k8s.io/api@v0.26.1/core/v1#PodSpec From 67dddd91e2859eaef6b00481a252c37d91f935ce Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Sat, 9 Mar 2024 03:11:12 -0500 Subject: [PATCH 09/22] Remove added tag values from test. Revert imagePullPolicy --- mysqloperator/controller/innodbcluster/cluster_api.py | 6 +++--- mysqloperator/controller/innodbcluster/router_objects.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysqloperator/controller/innodbcluster/cluster_api.py b/mysqloperator/controller/innodbcluster/cluster_api.py index 3b86a0a4..beec2b19 100644 --- a/mysqloperator/controller/innodbcluster/cluster_api.py +++ b/mysqloperator/controller/innodbcluster/cluster_api.py @@ -1435,11 +1435,11 @@ def extra_router_volume_mounts(self) -> str: @property def router_image(self) -> str: if self.router.version: - version = self.router.version # + config.IMAGE_TAG + version = self.router.version elif self.version: - version = self.version # + config.IMAGE_TAG + version = self.version else: - version = config.DEFAULT_ROUTER_VERSION_TAG # + config.IMAGE_TAG + version = config.DEFAULT_ROUTER_VERSION_TAG image = config.MYSQL_ROUTER_IMAGE if self.edition == Edition.community else config.MYSQL_ROUTER_EE_IMAGE diff --git a/mysqloperator/controller/innodbcluster/router_objects.py b/mysqloperator/controller/innodbcluster/router_objects.py index 0953d77e..6de8d247 100644 --- a/mysqloperator/controller/innodbcluster/router_objects.py +++ b/mysqloperator/controller/innodbcluster/router_objects.py @@ -173,7 +173,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, containers: - name: router image: {spec.router_image} - imagePullPolicy: Always # Hardcoded because spec.router_image_pull_policy isn't working: {spec.router_image_pull_policy} + imagePullPolicy: {spec.router_image_pull_policy} securityContext: # These can't go to spec.template.spec.securityContext # See: https://pkg.go.dev/k8s.io/api@v0.26.1/core/v1#PodTemplateSpec / https://pkg.go.dev/k8s.io/api@v0.26.1/core/v1#PodSpec From a74fbc21fea5592209bd60726871686c6df35417 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:05:31 -0500 Subject: [PATCH 10/22] attempt to fix missing router image attribute --- mysqloperator/controller/innodbcluster/router_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/router_objects.py b/mysqloperator/controller/innodbcluster/router_objects.py index 6de8d247..98d69d52 100644 --- a/mysqloperator/controller/innodbcluster/router_objects.py +++ b/mysqloperator/controller/innodbcluster/router_objects.py @@ -172,7 +172,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, fsGroup: 999 containers: - name: router - image: {spec.router_image} + image: {config.DEFAULT_IMAGE_REPOSITORY}/{config.MYSQL_ROUTER_IMAGE}:{config.DEFAULT_ROUTER_VERSION_TAG}{config.IMAGE_TAG} imagePullPolicy: {spec.router_image_pull_policy} securityContext: # These can't go to spec.template.spec.securityContext From c7e42fe9c8e2acd8d143dcb8b6f7015a903934ce Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Sun, 10 Mar 2024 12:51:50 -0400 Subject: [PATCH 11/22] hardcode router.image to our docker.io registry --- mysqloperator/controller/innodbcluster/router_objects.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/router_objects.py b/mysqloperator/controller/innodbcluster/router_objects.py index 98d69d52..f44236d2 100644 --- a/mysqloperator/controller/innodbcluster/router_objects.py +++ b/mysqloperator/controller/innodbcluster/router_objects.py @@ -125,6 +125,8 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, (router_bootstrap_options, router_tls_exists, ca_and_tls) = get_bootstrap_and_tls_options(cluster) router_command = ['mysqlrouter', *spec.router.options] +# spec.template.spec.containers[1].image was: {config.DEFAULT_IMAGE_REPOSITORY}/{config.MYSQL_ROUTER_IMAGE}:{config.DEFAULT_ROUTER_VERSION_TAG}{config.IMAGE_TAG} +# image here is hard coded to our docker.io repo tmpl = f""" apiVersion: apps/v1 kind: Deployment @@ -172,7 +174,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, fsGroup: 999 containers: - name: router - image: {config.DEFAULT_IMAGE_REPOSITORY}/{config.MYSQL_ROUTER_IMAGE}:{config.DEFAULT_ROUTER_VERSION_TAG}{config.IMAGE_TAG} + image: docker.io/ifeelfine/community-router:8.3.0-aarch64 imagePullPolicy: {spec.router_image_pull_policy} securityContext: # These can't go to spec.template.spec.securityContext From d9a2779d9e5906e4e5b163ca7d238c7530525c73 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Sun, 10 Mar 2024 13:41:36 -0400 Subject: [PATCH 12/22] router_objects fix template metadata.label to .labels --- mysqloperator/controller/innodbcluster/router_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/router_objects.py b/mysqloperator/controller/innodbcluster/router_objects.py index f44236d2..b2e0c984 100644 --- a/mysqloperator/controller/innodbcluster/router_objects.py +++ b/mysqloperator/controller/innodbcluster/router_objects.py @@ -132,7 +132,7 @@ def prepare_router_deployment(cluster: InnoDBCluster, logger, *, kind: Deployment metadata: name: {spec.name}-router - label: + labels: tier: mysql mysql.oracle.com/cluster: {spec.name} app.kubernetes.io/name: mysql-innodbcluster From 489c9d5390c94cfeea74ab1d086c19173d80ae8f Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:21:43 -0400 Subject: [PATCH 13/22] added context to console log msgs during cluster creation --- .../innodbcluster/operator_cluster.py | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/mysqloperator/controller/innodbcluster/operator_cluster.py b/mysqloperator/controller/innodbcluster/operator_cluster.py index e42a34d1..2af48be0 100644 --- a/mysqloperator/controller/innodbcluster/operator_cluster.py +++ b/mysqloperator/controller/innodbcluster/operator_cluster.py @@ -186,20 +186,20 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, print("0. Components ConfigMaps and Secrets") for cm in cluster_objects.prepare_component_config_configmaps(icspec, logger): if not cluster.get_configmap(cm['metadata']['name']): - print(f"\tCreating CM {cm['metadata']['name']} ...") + print(f"\tCreating CM {cm['metadata']['name']}...\t{cm}") kopf.adopt(cm) api_core.create_namespaced_config_map(namespace, cm) for secret in cluster_objects.prepare_component_config_secrets(icspec, logger): if not cluster.get_secret(secret['metadata']['name']): - print(f"\tCreating Secret {secret['metadata']['name']} ...") + print(f"\tCreating Secret {secret['metadata']['name']}...\t{secret}") kopf.adopt(secret) api_core.create_namespaced_secret(namespace, secret) print("0.5. Additional ConfigMaps") for cm in cluster_objects.prepare_additional_configmaps(icspec, logger): if not cluster.get_configmap(cm['metadata']['name']): - print(f"\tCreating CM {cm['metadata']['name']} ...") + print(f"\tCreating CM {cm['metadata']['name']}...\t{cm}") kopf.adopt(cm) api_core.create_namespaced_config_map(namespace, cm) @@ -207,7 +207,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(lambda: cluster.get_initconf(icspec)): print("\tPreparing...") configs = cluster_objects.prepare_initconf(cluster, icspec, logger) - print("\tCreating...") + print(f"\tCreating Config {configs['metadata']['name']}...\t{configs}") kopf.adopt(configs) api_core.create_namespaced_config_map(namespace, configs) @@ -215,7 +215,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(cluster.get_private_secrets): print("\tPreparing...") secret = cluster_objects.prepare_secrets(icspec) - print("\tCreating...") + print(f"\tCreating Secret {secret['metadata']['name']}...\t{secret}") kopf.adopt(secret) api_core.create_namespaced_secret(namespace=namespace, body=secret) @@ -223,7 +223,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(cluster.get_router_account): print("\tPreparing...") secret = router_objects.prepare_router_secrets(icspec) - print("\tCreating...") + print(f"\tCreating Secret {secret['metadata']['name']}...\t{secret}") kopf.adopt(secret) api_core.create_namespaced_secret(namespace=namespace, body=secret) @@ -231,7 +231,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(cluster.get_service): print("\tPreparing...") service = cluster_objects.prepare_cluster_service(icspec) - print(f"\tCreating Service {service['metadata']['name']}...") + print(f"\tCreating Service {service['metadata']['name']}...\t{service}") kopf.adopt(service) api_core.create_namespaced_service(namespace=namespace, body=service) @@ -242,36 +242,36 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not existing_sa: print("\tPreparing...") sa = cluster_objects.prepare_service_account(icspec) - print(f"\tCreating...{sa}") + print(f"\tCreating Service Account {sa['metadata']['name']}...\t{sa}") kopf.adopt(sa) api_core.create_namespaced_service_account(namespace=namespace, body=sa) elif icspec.imagePullSecrets: patch = cluster_objects.prepare_service_account_patch_for_image_pull_secrets(icspec) - print(f"\tPatching existing SA with {patch}") + print(f"\tPatching existing SA {sa['metadata']['name']} with {patch}") api_core.patch_namespaced_service_account(name=existing_sa.metadata.name, namespace=namespace, body=patch) print("6. Cluster RoleBinding") if not ignore_404(lambda: cluster.get_role_binding(icspec)): - print("\tPreparing...") + print(f"\tPreparing...") rb = cluster_objects.prepare_role_binding(icspec) - print(f"\tCreating RoleBinding {rb['metadata']['name']} ...") + print(f"\tCreating RoleBinding {rb['metadata']['name']}...\t{rb}") kopf.adopt(rb) api_rbac.create_namespaced_role_binding(namespace=namespace, body=rb) print("7. Cluster StatefulSet") if not ignore_404(cluster.get_stateful_set): - print("\tPreparing...") + print(f"\tPreparing...") statefulset = cluster_objects.prepare_cluster_stateful_set(icspec, logger) - print(f"\tCreating...{statefulset}") + print(f"\tCreating Stateful Set {statefulset['metadata']['name']}...\tstatefulset}") kopf.adopt(statefulset) api_apps.create_namespaced_stateful_set(namespace=namespace, body=statefulset) print("8. Cluster PodDisruptionBudget") if not ignore_404(cluster.get_disruption_budget): - print("\tPreparing...") + print(f"\tPreparing...") disruption_budget = cluster_objects.prepare_cluster_pod_disruption_budget(icspec) - print("\tCreating...") + print(f"\tCreating {disruption_budget['metadata']['name']}...\t{disruption_budget}") kopf.adopt(disruption_budget) api_policy.create_namespaced_pod_disruption_budget(namespace=namespace, body=disruption_budget) @@ -281,45 +281,45 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, for rr in icspec.readReplicas: do_create_read_replica(cluster, rr, True, "\t\t", logger) else: - print("\tNo Read Replica") + print(f"\tNo Read Replica") print("10. Router Service") if not ignore_404(cluster.get_router_service): - print("\tPreparing...") + print(f"\tPreparing...") router_service = router_objects.prepare_router_service(icspec) - print("\tCreating...") + print(f"\tCreating {router_service['metadata']['name']}...\t{router_service}") kopf.adopt(router_service) api_core.create_namespaced_service(namespace=namespace, body=router_service) print("11. Router Deployment") if not ignore_404(cluster.get_router_deployment): if icspec.router.instances > 0: - print("\tPreparing...") + print(f"\tPreparing...") # This will create the deployment but 0 instances. When the cluster is created (first # instance joins it) the instance count will be set to icspec.router.instances router_deployment = router_objects.prepare_router_deployment(cluster, logger, init_only=True) - print(f"\tCreating...{router_deployment}") + print(f"\tCreating {router_deployment['metadata']['name']}...\t{router_deployment}") kopf.adopt(router_deployment) api_apps.create_namespaced_deployment(namespace=namespace, body=router_deployment) else: # If the user decides to set !0 routers, the routine that handles that that # will create the deployment - print("\tRouter count is 0. No Deployment is created.") + print(f"\tRouter count is 0. No Deployment is created.") print("12. Backup Secrets") if not ignore_404(cluster.get_backup_account): - print("\tPreparing...") + print(f"\tPreparing...") secret = backup_objects.prepare_backup_secrets(icspec) - print("\tCreating...") + print(f"\tCreating Secret {secret['metadata']['name']}...\t{secret}") kopf.adopt(secret) api_core.create_namespaced_secret(namespace=namespace, body=secret) print("13. Metrics Service Monitor") if not ignore_404(cluster.get_metrics_monitor): if icspec.metrics and icspec.metrics.enable and icspec.metrics.monitor: - print("\tPreparing...") + print(f"\tPreparing...") monitor = cluster_objects.prepare_metrics_service_monitor(cluster, logger) - print("\tCreating...") + print(f"\tCreating Monitor {monitor['metadata']['name']}...\t{monitor}") kopf.adopt(monitor) print(monitor) try: @@ -336,13 +336,13 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, except Exception as exc: cluster.warn(action="CreateCluster", reason="CreateResourceFailed", - message=f"{exc}") + message=f"{exc}") raise print(f"13. Setting operator version for the IC to {DEFAULT_OPERATOR_VERSION_TAG}{config.IMAGE_TAG}") cluster.set_operator_version(DEFAULT_OPERATOR_VERSION_TAG) # + config.IMAGE_TAG) cluster.info(action="CreateCluster", reason="ResourcesCreated", - message="Dependency resources created, switching status to PENDING") + message="Dependency resources created, switching status to PENDING") cluster.set_status({ "cluster": { "status": diagnose.ClusterDiagStatus.PENDING.value, From 17eb29dbd04eb1d95e5a4096d70f5b289dd3454f Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:22:03 -0400 Subject: [PATCH 14/22] force logging to debug3 --- mysqloperator/controller/innodbcluster/cluster_objects.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysqloperator/controller/innodbcluster/cluster_objects.py b/mysqloperator/controller/innodbcluster/cluster_objects.py index b90699c9..82a247c1 100644 --- a/mysqloperator/controller/innodbcluster/cluster_objects.py +++ b/mysqloperator/controller/innodbcluster/cluster_objects.py @@ -166,7 +166,7 @@ def prepare_cluster_stateful_set(spec: AbstractServerSetSpec, logger: Logger) -> else: raise NotImplementedError(f"Unknown subtype {type(spec)} for creating StatefulSet") - +# DB mod lines 262 (from INFO to debug3) & 352 (add log-level=@debug3) # TODO re-add "--log-file=", tmpl = f""" apiVersion: apps/v1 @@ -259,7 +259,7 @@ def prepare_cluster_stateful_set(spec: AbstractServerSetSpec, logger: Logger) -> image: {spec.operator_image} imagePullPolicy: {spec.sidecar_image_pull_policy} # For datadir see the datadir volum mount - command: ["mysqlsh", "--log-level=@INFO", "--pym", "mysqloperator", "init", + command: ["mysqlsh", "--log-level=@debug3", "--pym", "mysqloperator", "init", "--pod-name", "$(POD_NAME)", "--pod-namespace", "$(POD_NAMESPACE)", "--datadir", "/var/lib/mysql" @@ -349,7 +349,7 @@ def prepare_cluster_stateful_set(spec: AbstractServerSetSpec, logger: Logger) -> - name: sidecar image: {spec.operator_image} imagePullPolicy: {spec.sidecar_image_pull_policy} - command: ["mysqlsh", "--pym", "mysqloperator", "sidecar", + command: ["mysqlsh", "--log-level=@debug3", "--pym", "mysqloperator", "sidecar", "--pod-name", "$(POD_NAME)", "--pod-namespace", "$(POD_NAMESPACE)", "--datadir", "/var/lib/mysql" From d040ce4710ffbc18ef9469f18670461163835b49 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:24:28 -0400 Subject: [PATCH 15/22] fix missing { --- mysqloperator/controller/innodbcluster/operator_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/operator_cluster.py b/mysqloperator/controller/innodbcluster/operator_cluster.py index 2af48be0..62bfd410 100644 --- a/mysqloperator/controller/innodbcluster/operator_cluster.py +++ b/mysqloperator/controller/innodbcluster/operator_cluster.py @@ -262,7 +262,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(cluster.get_stateful_set): print(f"\tPreparing...") statefulset = cluster_objects.prepare_cluster_stateful_set(icspec, logger) - print(f"\tCreating Stateful Set {statefulset['metadata']['name']}...\tstatefulset}") + print(f"\tCreating Stateful Set {statefulset['metadata']['name']}...\{tstatefulset}") kopf.adopt(statefulset) api_apps.create_namespaced_stateful_set(namespace=namespace, body=statefulset) From fd78449cc1bfadbb30c7376bf32a0d7a754f5f20 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:24:48 -0400 Subject: [PATCH 16/22] correct spelling mistake --- mysqloperator/controller/innodbcluster/operator_cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/operator_cluster.py b/mysqloperator/controller/innodbcluster/operator_cluster.py index 62bfd410..991d8f85 100644 --- a/mysqloperator/controller/innodbcluster/operator_cluster.py +++ b/mysqloperator/controller/innodbcluster/operator_cluster.py @@ -262,7 +262,7 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(cluster.get_stateful_set): print(f"\tPreparing...") statefulset = cluster_objects.prepare_cluster_stateful_set(icspec, logger) - print(f"\tCreating Stateful Set {statefulset['metadata']['name']}...\{tstatefulset}") + print(f"\tCreating Stateful Set {statefulset['metadata']['name']}...\{statefulset}") kopf.adopt(statefulset) api_apps.create_namespaced_stateful_set(namespace=namespace, body=statefulset) From ca9a37bb47142af4ebe973d8a2972628ae2a28d9 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:14:11 -0400 Subject: [PATCH 17/22] Bump version to 8.4.1-2.1.4 --- CONTRIBUTING.md | 4 +- Dockerfile.patch | 2 +- LICENSE | 6 +- README-aarch64.md | 2 +- README.md | 4 +- deploy/deploy-operator.yaml | 133 +++++++++++------- gen_dockerfile.sh | 2 +- helm/mysql-innodbcluster/Chart.yaml | 4 +- helm/mysql-operator/Chart.yaml | 4 +- helm/mysql-operator/templates/NOTES.txt | 4 +- .../controller/backup/backup_objects.py | 2 +- mysqloperator/controller/config.py | 2 +- tag.sh | 2 +- tests/ci/registry/images-list.txt | 16 +-- tests/setup/defaults.py | 4 +- 15 files changed, 114 insertions(+), 77 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00ec06cb..ace37acd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,13 +37,13 @@ Building container images for the MySQL Operator with our provided `Dockerfile` For changes only to the Operator code, which don't require changes to dependencies, an easy alternative is just to patch the images we provide adding your code changes. A way to facilitate is via a `Dockerfile` like this: - ARG BASE_VERSION=9.0.0-2.2.0 + ARG BASE_VERSION=8.4.1-2.1.4 FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/ After building an image like this: - docker build -t mysql/community-operator:9.0.0-2.2.0 -f Dockerfile.patch . + docker build -t mysql/community-operator:8.4.1-2.1.4 -f Dockerfile.patch . This can be passed to a local registry and used from there. Please refer to the MySQL Operator documentation and the documentation of your Kubernetes distribution of choice. diff --git a/Dockerfile.patch b/Dockerfile.patch index c7530eaa..b462c7f0 100644 --- a/Dockerfile.patch +++ b/Dockerfile.patch @@ -1,3 +1,3 @@ -ARG BASE_VERSION=8.3.0-2.1.2-aarch64 +ARG BASE_VERSION=8.4.1-2.1.4-aarch64 FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/mysqloperator diff --git a/LICENSE b/LICENSE index 01bbafd6..69fea1fe 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Licensing Information User Manual -MySQL Operator for Kubernetes 9.0.0 Community +MySQL Operator for Kubernetes 8.4.1 Community __________________________________________________________________ Introduction @@ -8,13 +8,13 @@ Introduction This License Information User Manual contains Oracle's product license and other licensing information, including licensing information for third-party software which may be included in this distribution of - MySQL Operator for Kubernetes 9.0.0 Community. + MySQL Operator for Kubernetes 8.4.1 Community. Last updated: May 2024 Licensing Information - This release of MySQL Operator for Kubernetes 9.0.0 Community is + This release of MySQL Operator for Kubernetes 8.4.1 Community is brought to you by the MySQL team at Oracle. This software is released under version 1 of the Universal Permissive License (UPL), as set forth below. diff --git a/README-aarch64.md b/README-aarch64.md index a1777f29..277dbfa1 100644 --- a/README-aarch64.md +++ b/README-aarch64.md @@ -22,7 +22,7 @@ Build the image (on an ARM64 host): ```shell $ podman build \ - -t ghcr.io/ifeelfine/community-operator:8.3.0-2.1.2-aarch64 \ + -t ghcr.io/ifeelfine/community-operator:8.4.1-2.1.4-aarch64 \ --label "org.opencontainers.image.source=https://github.com/ifeelfine/mysql-operator" \ --label "org.opencontainers.image.description=MySQL Operator image hardcoded to aarch64 achitecture" \ --label "org.opencontainers.image.licenses=MIT" \ diff --git a/README.md b/README.md index 4e317572..1dc77f21 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,13 @@ and attribution notices for these materials, please refer to the `LICENSE` file. First deploy the Custom Resource Definition (CRDs): ```sh -$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/9.0.0-2.2.0/deploy/deploy-crds.yaml +$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/8.4.1-2.1.4/deploy/deploy-crds.yaml ``` Then deploy MySQL Operator for Kubernetes: ```sh -$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/9.0.0-2.2.0/deploy/deploy-operator.yaml +$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/8.4.1-2.1.4/deploy/deploy-operator.yaml ``` Verify the operator is running by checking the deployment inside the `mysql-operator` namespace: diff --git a/deploy/deploy-operator.yaml b/deploy/deploy-operator.yaml index 22e47db3..568de8be 100644 --- a/deploy/deploy-operator.yaml +++ b/deploy/deploy-operator.yaml @@ -1,95 +1,109 @@ # The main role for the operator -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: mysql-operator rules: + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "create", "update", "list", "watch", "patch", "delete"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "patch", "update"] + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["list", "watch"] - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch", "patch"] - apiGroups: [""] resources: ["pods/status"] verbs: ["get", "patch", "update", "watch"] - # Kopf needs patch on secrets or the sidecar will throw - # The operator needs this verb to be able to pass it to the sidecar - apiGroups: [""] resources: ["secrets"] verbs: ["get", "create", "list", "watch", "patch"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "create", "update", "list", "watch", "patch", "delete"] - - apiGroups: [""] - resources: ["services"] - verbs: ["get", "create", "list", "update", "delete", "patch"] - apiGroups: [""] resources: ["serviceaccounts"] verbs: ["get", "create", "patch"] - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch", "update"] - - apiGroups: ["rbac.authorization.k8s.io"] - resources: ["rolebindings"] - verbs: ["get", "create"] - - apiGroups: ["policy"] - resources: ["poddisruptionbudgets"] - verbs: ["get", "create"] - - apiGroups: ["batch"] - resources: ["jobs"] - verbs: ["create"] - - apiGroups: ["batch"] - resources: ["cronjobs"] - verbs: ["get", "create", "update", "delete"] + resources: ["services"] + verbs: ["get", "create", "list", "update", "delete", "patch"] + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["list", "watch"] - apiGroups: ["apps"] resources: ["deployments", "statefulsets"] verbs: ["get", "create", "patch", "update", "watch", "delete"] + - apiGroups: ["batch"] + resources: ["cronjobs"] + verbs: ["get", "create", "update", "delete"] + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["create"] + - apiGroups: ["monitoring.coreos.com"] + resources: ["servicemonitors"] + verbs: ["get", "create", "patch", "update", "delete"] - apiGroups: ["mysql.oracle.com"] resources: ["*"] verbs: ["*"] + - apiGroups: ["policy"] + resources: ["poddisruptionbudgets"] + verbs: ["get", "create"] + - apiGroups: ["rbac.authorization.k8s.io"] + resources: ["rolebindings"] + verbs: ["get", "create"] - apiGroups: ["zalando.org"] resources: ["*"] verbs: ["get", "patch", "list", "watch"] - # Kopf: runtime observation of namespaces & CRDs (addition/deletion). - - apiGroups: [apiextensions.k8s.io] - resources: [customresourcedefinitions] - verbs: [list, watch] - - apiGroups: [""] - resources: [namespaces] - verbs: [list, watch] - - apiGroups: ["monitoring.coreos.com"] - resources: ["servicemonitors"] - verbs: ["get", "create", "patch", "update", "delete"] --- # role for the server sidecar -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: mysql-sidecar rules: + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "create", "list", "watch", "patch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "patch", "update"] + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["list", "watch"] - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch", "patch"] - apiGroups: [""] resources: ["pods/status"] verbs: ["get", "patch", "update", "watch"] - # Kopf needs patch on secrets or the sidecar will throw - - apiGroups: [""] + - apiGroups: [""] # Kopf needs patch on secrets or the sidecar will throw resources: ["secrets"] verbs: ["get", "create", "list", "watch", "patch"] - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "create", "list", "watch", "patch"] - apiGroups: [""] resources: ["services"] verbs: ["get", "create", "list", "update"] - apiGroups: [""] resources: ["serviceaccounts"] verbs: ["get", "create"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch", "update"] + - apiGroups: ["admissionregistration.k8s.io/v1", "admissionregistration.k8s.io/v1beta1"] + resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"] + verbs: ["create", "patch"] + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["list", "watch"] - apiGroups: ["apps"] resources: ["deployments"] verbs: ["get", "patch"] + - apiGroups: ["kopf.dev"] + resources: ["clusterkopfpeerings"] + verbs: ["create", "patch"] + - apiGroups: ["kopf.dev"] + resources: ["kopfexamples"] + verbs: ["list", "watch"] + - apiGroups: ["monitoring.coreos.com"] + resources: ["servicemonitors"] + verbs: ["create", "delete", "get", "patch", "update"] - apiGroups: ["mysql.oracle.com"] resources: ["innodbclusters"] verbs: ["get", "watch", "list"] @@ -101,8 +115,8 @@ rules: verbs: ["get", "patch", "update", "watch"] --- # Give access to the operator -apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 metadata: name: mysql-operator-rolebinding subjects: @@ -118,24 +132,47 @@ roleRef: name: mysql-operator apiGroup: rbac.authorization.k8s.io --- -apiVersion: zalando.org/v1 +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: mysql-sidecar-rolebinding +subjects: + - kind: ServiceAccount + name: mysql-sidecar-sa + namespace: shared-backend + # TODO The following entry is for dev purposes only + #- kind: Group + # name: system:serviceaccounts + # apiGroup: rbac.authorization.k8s.io +roleRef: + kind: ClusterRole + name: mysql-sidecar + apiGroup: rbac.authorization.k8s.io +--- kind: ClusterKopfPeering +apiVersion: zalando.org/v1 metadata: name: mysql-operator --- -apiVersion: v1 kind: Namespace +apiVersion: v1 metadata: name: mysql-operator --- -apiVersion: v1 kind: ServiceAccount +apiVersion: v1 metadata: name: mysql-operator-sa namespace: mysql-operator --- -apiVersion: apps/v1 +kind: ServiceAccount +apiVersion: v1 +metadata: + name: mysql-sidecar-sa + namespace: shared-backend +--- kind: Deployment +apiVersion: apps/v1 metadata: name: mysql-operator namespace: mysql-operator @@ -143,7 +180,7 @@ metadata: version: "1.0" app.kubernetes.io/name: mysql-operator app.kubernetes.io/instance: mysql-operator - app.kubernetes.io/version: 9.0.0-2.2.0 + app.kubernetes.io/version: 8.4.1-2.1.4 app.kubernetes.io/component: controller app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator diff --git a/gen_dockerfile.sh b/gen_dockerfile.sh index 4ec331e7..2ad60955 100755 --- a/gen_dockerfile.sh +++ b/gen_dockerfile.sh @@ -8,7 +8,7 @@ MYSQL_REPO_URL="http://repo.mysql.com"; [ -n "${1}" ] && MYSQL_REPO_URL="${1}" MYSQL_OPERATOR_PYTHON_DEPS="mysql-operator-python-deps"; [ -n "${2}" ] && MYSQL_OPERATOR_PYTHON_DEPS="${2}" MYSQL_OPERATOR_PYTHON_DEPS_VERSION="3.10.8"; [ -n "${3}" ] && MYSQL_OPERATOR_PYTHON_DEPS_VERSION="${3}" -MYSQL_SHELL_VERSION=9.0.0; [ -n "${4}" ] && MYSQL_SHELL_VERSION="${4}" +MYSQL_SHELL_VERSION=8.4.1; [ -n "${4}" ] && MYSQL_SHELL_VERSION="${4}" MYSQL_CONFIG_PKG="mysql80-community-release"; [ -n "${5}" ] && MYSQL_CONFIG_PKG="${5}" MYSQL_SHELL_REPO="mysql-tools-community"; [ -n "${6}" ] && MYSQL_SHELL_REPO="${6}" ARCH="amd64"; [ -n "${7}" ] && ARCH="${7}" diff --git a/helm/mysql-innodbcluster/Chart.yaml b/helm/mysql-innodbcluster/Chart.yaml index 150345da..c466fe17 100644 --- a/helm/mysql-innodbcluster/Chart.yaml +++ b/helm/mysql-innodbcluster/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 -appVersion: "9.0.0" +appVersion: "8.4.1" name: mysql-innodbcluster description: MySQL InnoDB Cluster Helm Chart for deploying MySQL InnoDB Cluster in Kubernetes type: application -version: "2.2.0" +version: "2.1.4" icon: https://www.mysql.com/common/logos/logo-mysql-170x115.png diff --git a/helm/mysql-operator/Chart.yaml b/helm/mysql-operator/Chart.yaml index 7fa1144e..5c573a0f 100644 --- a/helm/mysql-operator/Chart.yaml +++ b/helm/mysql-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 -appVersion: "9.0.0-2.2.0" +appVersion: "8.4.1-2.1.4" name: mysql-operator description: MySQL Operator Helm Chart for deploying MySQL InnoDB Cluster in Kubernetes type: application -version: "2.2.0" +version: "2.1.4" icon: https://www.mysql.com/common/logos/logo-mysql-170x115.png diff --git a/helm/mysql-operator/templates/NOTES.txt b/helm/mysql-operator/templates/NOTES.txt index 42feda4e..da282fc6 100644 --- a/helm/mysql-operator/templates/NOTES.txt +++ b/helm/mysql-operator/templates/NOTES.txt @@ -5,7 +5,7 @@ Create an MySQL InnoDB Cluster by executing: export NAMESPACE="your-namespace" # in case the namespace doesn't exist, please pass --create-namespace helm install my-mysql-innodbcluster mysql-operator/mysql-innodbcluster -n $NAMESPACE \ - --version 2.2.0 \ + --version 2.1.4 \ --set credentials.root.password=">-0URS4F3P4SS" \ --set tls.useSelfSigned=true @@ -36,7 +36,7 @@ Create an MySQL InnoDB Cluster by executing: | kubectl apply -f - helm install my-mysql-innodbcluster mysql-operator/mysql-innodbcluster -n $NAMESPACE \ - --version 2.2.0 \ + --version 2.1.4 \ --set credentials.root.password=">-0URS4F3P4SS" \ --set tls.useSelfSigned=false \ --set tls.caSecretName=$CA_SECRET \ diff --git a/mysqloperator/controller/backup/backup_objects.py b/mysqloperator/controller/backup/backup_objects.py index ba5a2c02..dfba9246 100644 --- a/mysqloperator/controller/backup/backup_objects.py +++ b/mysqloperator/controller/backup/backup_objects.py @@ -70,7 +70,7 @@ def prepare_backup_job(jobname: str, spec: MySQLBackupSpec) -> dict: fsGroup: 27 containers: - name: operator-backup-job - image: {spec.operator_image}{consts.ARCH} + image: {spec.operator_image}{config.ARCH} imagePullPolicy: {spec.operator_image_pull_policy} command: ["mysqlsh", "--pym", "mysqloperator", "backup", "--command", "execute-backup", diff --git a/mysqloperator/controller/config.py b/mysqloperator/controller/config.py index c39e38af..a2ead8dc 100644 --- a/mysqloperator/controller/config.py +++ b/mysqloperator/controller/config.py @@ -35,7 +35,7 @@ DEFAULT_SERVER_VERSION_TAG = DEFAULT_VERSION_TAG MIN_SUPPORTED_MYSQL_VERSION = "8.0.27" -MAX_SUPPORTED_MYSQL_VERSION = "9.0.0" # SHELL_VERSION +MAX_SUPPORTED_MYSQL_VERSION = "8.4.1" # SHELL_VERSION DISABLED_MYSQL_VERSION = { "8.0.29": "Support for MySQL 8.0.29 is disabled. Please see https://dev.mysql.com/doc/relnotes/mysql-operator/en/news-8-0-29.html" diff --git a/tag.sh b/tag.sh index 0530eb65..9476e875 100755 --- a/tag.sh +++ b/tag.sh @@ -6,4 +6,4 @@ SUFFIX='aarch64'; [ -n "$1" ] && SUFFIX=${1} -echo "9.0.0-2.2.0$SUFFIX" +echo "8.4.1-2.1.4-$SUFFIX" diff --git a/tests/ci/registry/images-list.txt b/tests/ci/registry/images-list.txt index d9bfb5df..bb11348f 100644 --- a/tests/ci/registry/images-list.txt +++ b/tests/ci/registry/images-list.txt @@ -66,8 +66,8 @@ community-server:8.4.0 mysql/community-server:8.4.0 1 --- -community-server:9.0.0 -mysql/community-server:9.0.0 +community-server:8.4.1 +mysql/community-server:8.4.1 1 --- community-router:8.0.27 @@ -138,8 +138,8 @@ community-router:8.4.0 mysql/community-router:8.4.0 1 --- -community-router:9.0.0 -mysql/community-router:9.0.0 +community-router:8.4.1 +mysql/community-router:8.4.1 1 --- community-operator:8.0.29-2.0.4 @@ -302,8 +302,8 @@ enterprise-router:8.4.0 mysql/enterprise-router:8.4.0 1 --- -enterprise-router:9.0.0 -mysql/enterprise-router:9.0.0 +enterprise-router:8.4.1 +mysql/enterprise-router:8.4.1 1 --- enterprise-router:8.2.0-arm64 @@ -414,8 +414,8 @@ enterprise-server:8.4.0 mysql/enterprise-server:8.4.0 1 --- -enterprise-server:9.0.0 -mysql/enterprise-server:9.0.0 +enterprise-server:8.4.1 +mysql/enterprise-server:8.4.1 1 --- enterprise-server:8.2.0-arm diff --git a/tests/setup/defaults.py b/tests/setup/defaults.py index c0aeeea3..cdf50ccc 100644 --- a/tests/setup/defaults.py +++ b/tests/setup/defaults.py @@ -6,7 +6,7 @@ import os # version -VERSION_TAG = "9.0.0" +VERSION_TAG = "8.4.1" MIN_SUPPORTED_VERSION = "8.0.27" MAX_SUPPORTED_VERSION = "9.0.0" @@ -27,7 +27,7 @@ "OPERATOR_TEST_EE_IMAGE_NAME", default="enterprise-operator") OPERATOR_VERSION_TAG = os.getenv( - "OPERATOR_TEST_VERSION_TAG", default="9.0.0-2.2.0") + "OPERATOR_TEST_VERSION_TAG", default="8.4.1-2.1.4") OPERATOR_OLD_VERSION_TAG = os.getenv( "OPERATOR_TEST_OLD_VERSION_TAG", default="8.0.31-2.0.7") From 5a383cd3b4749b88facd778bb2e55bcf537ca319 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:16:25 -0400 Subject: [PATCH 18/22] fix typo at lines 245/246 --- mysqloperator/controller/innodbcluster/operator_cluster.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysqloperator/controller/innodbcluster/operator_cluster.py b/mysqloperator/controller/innodbcluster/operator_cluster.py index a0863c1b..6b0f4315 100644 --- a/mysqloperator/controller/innodbcluster/operator_cluster.py +++ b/mysqloperator/controller/innodbcluster/operator_cluster.py @@ -242,7 +242,8 @@ def on_innodbcluster_create(name: str, namespace: Optional[str], body: Body, if not ignore_404(cluster.get_service): print("\tPreparing...") service = cluster_objects.prepare_cluster_service(icspec, logger) - print(f"\tCreating Service {service['metadata']['name']}...{service}") kopf.adopt(service) + print(f"\tCreating Service {service['metadata']['name']}...{service}") + kopf.adopt(service) api_core.create_namespaced_service(namespace=namespace, body=service) print("5. Cluster ServiceAccount") From 3087a2b3acd8b70abf0b5779b2296128b83d7e9b Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:18:50 -0400 Subject: [PATCH 19/22] update sed command to work on macos & linux & output variable values when running script. --- gen_dockerfile.sh | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/gen_dockerfile.sh b/gen_dockerfile.sh index 2ad60955..5cac7d67 100755 --- a/gen_dockerfile.sh +++ b/gen_dockerfile.sh @@ -13,11 +13,24 @@ MYSQL_CONFIG_PKG="mysql80-community-release"; [ -n "${5}" ] && MYSQL_CONFIG_PKG= MYSQL_SHELL_REPO="mysql-tools-community"; [ -n "${6}" ] && MYSQL_SHELL_REPO="${6}" ARCH="amd64"; [ -n "${7}" ] && ARCH="${7}" +echo "MYSQL_REPO_URL = $MYSQL_REPO_URL" +echo "MYSQL_OPERATOR_PYTHON_DEPS = $MYSQL_OPERATOR_PYTHON_DEPS" +echo "MYSQL_OPERATOR_PYTHON_DEPS_VERSION = $MYSQL_OPERATOR_PYTHON_DEPS_VERSION" +echo "MYSQL_SHELL_VERSION = $MYSQL_SHELL_VERSION" +echo "MYSQL_CONFIG_PKG = $MYSQL_CONFIG_PKG" +echo "MYSQL_SHELL_REPO = $MYSQL_SHELL_REPO" +echo "ARCH = $ARCH" sed 's#%%MYSQL_OPERATOR_PYTHON_DEPS%%#'"${MYSQL_OPERATOR_PYTHON_DEPS}:${MYSQL_OPERATOR_PYTHON_DEPS_VERSION}-${ARCH}"'#g' docker-build/Dockerfile > tmpfile -sed -i 's#%%MYSQL_SHELL_VERSION%%#'"${MYSQL_SHELL_VERSION}"'#g' tmpfile -sed -i 's#%%MYSQL_REPO_URL%%#'"${MYSQL_REPO_URL}"'#g' tmpfile -sed -i 's#%%MYSQL_CONFIG_PKG%%#'"${MYSQL_CONFIG_PKG}"'#g' tmpfile -sed -i 's#%%MYSQL_SHELL_REPO%%#'"${MYSQL_SHELL_REPO}"'#g' tmpfile - +if [[ $(uname) == "Darwin" ]]; then + sed -i '' 's#%%MYSQL_SHELL_VERSION%%#'"${MYSQL_SHELL_VERSION}"'#g' tmpfile + sed -i '' 's#%%MYSQL_REPO_URL%%#'"${MYSQL_REPO_URL}"'#g' tmpfile + sed -i '' 's#%%MYSQL_CONFIG_PKG%%#'"${MYSQL_CONFIG_PKG}"'#g' tmpfile + sed -i '' 's#%%MYSQL_SHELL_REPO%%#'"${MYSQL_SHELL_REPO}"'#g' tmpfile +else + sed -i 's#%%MYSQL_SHELL_VERSION%%#'"${MYSQL_SHELL_VERSION}"'#g' tmpfile + sed -i 's#%%MYSQL_REPO_URL%%#'"${MYSQL_REPO_URL}"'#g' tmpfile + sed -i 's#%%MYSQL_CONFIG_PKG%%#'"${MYSQL_CONFIG_PKG}"'#g' tmpfile + sed -i 's#%%MYSQL_SHELL_REPO%%#'"${MYSQL_SHELL_REPO}"'#g' tmpfile +fi mv tmpfile Dockerfile From b27a9263693c3b2f4c1bd4d9d0c7a5a26e2f472a Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:20:22 -0400 Subject: [PATCH 20/22] sort & update deployment yaml. Add history to README-aarch64. In main readme make it clear ours is for ARM64 --- .gitignore | 3 ++- README-aarch64.md | 29 ++++++++++++++++++++++++----- README.md | 2 +- deploy/deploy-operator.yaml | 3 ++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index a5d0f73f..00ed3f90 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ __pycache__ .vscode /Dockerfile -.DS_Store \ No newline at end of file +.DS_Store +.venv \ No newline at end of file diff --git a/README-aarch64.md b/README-aarch64.md index 277dbfa1..92ff20ca 100644 --- a/README-aarch64.md +++ b/README-aarch64.md @@ -8,10 +8,10 @@ To that end, the following files were modified: | File | Change Description | | :- | :- | -| [`.gitignore`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/.gitignore) | Add .DS_Store to ignore macOS filesystem elements. | -| [`Dockerfile.patch`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/Dockerfile.patch) | Created this file to build our custom operator as suggested in [CONTRIBUTING.md](/CONTRIBUTING.md). | -| [`mysqloperator/controller/config.py`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py) | Wherever a version tag is being set, appended `-aarch64` to the value.
Changes occur on lines [26](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L26), [31](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L31), [34](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L34), [35](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L35), & [44](https://github.com/IFeelFine/mysql-operator/blob/aarch64/mysqloperator/controller/config.py#L44). | -| [`tag.sh`](https://github.com/IFeelFine/mysql-operator/blob/aarch64/tag.sh) | Set default suffix to `aarch64`. +| [`.gitignore`](/blob/aarch64/.gitignore) | Add .DS_Store to ignore macOS filesystem elements. | +| [`Dockerfile.patch`](/blob/aarch64/Dockerfile.patch) | Created this file to build our custom operator as suggested in [CONTRIBUTING.md](/CONTRIBUTING.md). | +| [`mysqloperator/controller/config.py`](/blob/aarch64/mysqloperator/controller/config.py) | Wherever a version tag is being set, appended `-aarch64` to the value.
Changes occur on lines [26](/blob/aarch64/mysqloperator/controller/config.py#L26), [31](/blob/aarch64/mysqloperator/controller/config.py#L31), [34](/blob/aarch64/mysqloperator/controller/config.py#L34), [35](/blob/aarch64/mysqloperator/controller/config.py#L35), & [44](/blob/aarch64/mysqloperator/controller/config.py#L44). | +| [`tag.sh`](/blob/aarch64/tag.sh) | Set default suffix to `aarch64`. ## Building @@ -23,10 +23,29 @@ Build the image (on an ARM64 host): ```shell $ podman build \ -t ghcr.io/ifeelfine/community-operator:8.4.1-2.1.4-aarch64 \ + -t ghcr.io/ifeelfine/community-operator:latest-aarch64 \ --label "org.opencontainers.image.source=https://github.com/ifeelfine/mysql-operator" \ --label "org.opencontainers.image.description=MySQL Operator image hardcoded to aarch64 achitecture" \ --label "org.opencontainers.image.licenses=MIT" \ -f Dockerfile.patch \ . -``` \ No newline at end of file +``` + +# History + +> _**NOTE:** The _`latest-aarch64`_ tag will always point to the most recently released version of the operator._ +> _You may safely use it with your deployment manifests._ + +| Version | Date | Notes | +| :- | :- | :- | +| 8.3.1-2.1.2 | March 7, 2024 | - Initial creation of the aarch64 coded image. | +| 8.4.1-2.1.4 | July 17, 1024 | - Bump to version 8.4.1.
- aarch64 brach merged. | + \ No newline at end of file diff --git a/README.md b/README.md index 1dc77f21..ef6c2e5e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ > [!WARNING] > This branch has been modified from the [`trunk`](https://github.com/IFeelFine/mysql-operator/tree/trunk) branch. > It includes changes that hardcode certain values. -> Please review our [README](/README-aarch64.md) file for details of the changes. +> Please review our [README-aarch64](/README-aarch64.md) file for details of the changes. > # MySQL Operator for Kubernetes diff --git a/deploy/deploy-operator.yaml b/deploy/deploy-operator.yaml index 568de8be..2fe2972e 100644 --- a/deploy/deploy-operator.yaml +++ b/deploy/deploy-operator.yaml @@ -1,3 +1,4 @@ +--- # The main role for the operator kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 @@ -35,7 +36,7 @@ rules: resources: ["deployments", "statefulsets"] verbs: ["get", "create", "patch", "update", "watch", "delete"] - apiGroups: ["batch"] - resources: ["cronjobs"] + resources: ["cronjobs", "jobs"] verbs: ["get", "create", "update", "delete"] - apiGroups: ["batch"] resources: ["jobs"] From ffa5ce85b75ec3a2c8e425f7987cc22442c1cca3 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:30:45 -0400 Subject: [PATCH 21/22] Move labels into Dockerfile.patch --- Dockerfile.patch | 3 +++ README-aarch64.md | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.patch b/Dockerfile.patch index b462c7f0..776c6c24 100644 --- a/Dockerfile.patch +++ b/Dockerfile.patch @@ -1,3 +1,6 @@ ARG BASE_VERSION=8.4.1-2.1.4-aarch64 FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION +LABEL org.opencontainers.image.source="https://github.com/ifeelfine/mysql-operator" +LABEL org.opencontainers.image.description="MySQL Operator image hardcoded to aarch64 achitecture" +LABEL org.opencontainers.image.licenses="MIT" COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/mysqloperator diff --git a/README-aarch64.md b/README-aarch64.md index 92ff20ca..d63365a4 100644 --- a/README-aarch64.md +++ b/README-aarch64.md @@ -24,9 +24,6 @@ Build the image (on an ARM64 host): $ podman build \ -t ghcr.io/ifeelfine/community-operator:8.4.1-2.1.4-aarch64 \ -t ghcr.io/ifeelfine/community-operator:latest-aarch64 \ - --label "org.opencontainers.image.source=https://github.com/ifeelfine/mysql-operator" \ - --label "org.opencontainers.image.description=MySQL Operator image hardcoded to aarch64 achitecture" \ - --label "org.opencontainers.image.licenses=MIT" \ -f Dockerfile.patch \ . From 44f14a681044280194a879dcdabcc159c9f8ce40 Mon Sep 17 00:00:00 2001 From: David Bates <13614128+imdebating@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:20:52 -0400 Subject: [PATCH 22/22] bump version to 8.4.3-2.1.5 --- CONTRIBUTING.md | 4 ++-- Dockerfile.patch | 2 +- README-aarch64.md | 2 +- README.md | 4 ++-- deploy/deploy-operator.yaml | 2 +- helm/mysql-operator/Chart.yaml | 2 +- tag.sh | 2 +- tests/ci/registry/images-list.txt | 8 ++++---- tests/setup/defaults.py | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db4966f1..b926a027 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,13 +37,13 @@ Building container images for the MySQL Operator with our provided `Dockerfile` For changes only to the Operator code, which don't require changes to dependencies, an easy alternative is just to patch the images we provide adding your code changes. A way to facilitate is via a `Dockerfile` like this: - ARG BASE_VERSION=9.1.0-2.2.2 + ARG BASE_VERSION=8.4.3-2.1.5 FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/ After building an image like this: - docker build -t mysql/community-operator:9.1.0-2.2.2 -f Dockerfile.patch . + docker build -t mysql/community-operator:8.4.3-2.1.5 -f Dockerfile.patch . This can be passed to a local registry and used from there. Please refer to the MySQL Operator documentation and the documentation of your Kubernetes distribution of choice. diff --git a/Dockerfile.patch b/Dockerfile.patch index c7530eaa..d9dbc35f 100644 --- a/Dockerfile.patch +++ b/Dockerfile.patch @@ -1,3 +1,3 @@ -ARG BASE_VERSION=8.3.0-2.1.2-aarch64 +ARG BASE_VERSION=8.4.3-2.1.5-aarch64 FROM container-registry.oracle.com/mysql/community-operator:$BASE_VERSION COPY mysqloperator/ /usr/lib/mysqlsh/python-packages/mysqloperator diff --git a/README-aarch64.md b/README-aarch64.md index a1777f29..407fb904 100644 --- a/README-aarch64.md +++ b/README-aarch64.md @@ -22,7 +22,7 @@ Build the image (on an ARM64 host): ```shell $ podman build \ - -t ghcr.io/ifeelfine/community-operator:8.3.0-2.1.2-aarch64 \ + -t ghcr.io/ifeelfine/community-operator:8.4.3-2.1.5-aarch64 \ --label "org.opencontainers.image.source=https://github.com/ifeelfine/mysql-operator" \ --label "org.opencontainers.image.description=MySQL Operator image hardcoded to aarch64 achitecture" \ --label "org.opencontainers.image.licenses=MIT" \ diff --git a/README.md b/README.md index 121d5632..ae745cb4 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,13 @@ and attribution notices for these materials, please refer to the `LICENSE` file. First deploy the Custom Resource Definition (CRDs): ```sh -$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/9.1.0-2.2.2/deploy/deploy-crds.yaml +$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/8.4.3-2.1.5/deploy/deploy-crds.yaml ``` Then deploy MySQL Operator for Kubernetes: ```sh -$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/9.1.0-2.2.2/deploy/deploy-operator.yaml +$> kubectl apply -f https://raw.githubusercontent.com/mysql/mysql-operator/8.4.3-2.1.5/deploy/deploy-operator.yaml ``` Verify the operator is running by checking the deployment inside the `mysql-operator` namespace: diff --git a/deploy/deploy-operator.yaml b/deploy/deploy-operator.yaml index a5a8ed6f..9200ec41 100644 --- a/deploy/deploy-operator.yaml +++ b/deploy/deploy-operator.yaml @@ -143,7 +143,7 @@ metadata: version: "1.0" app.kubernetes.io/name: mysql-operator app.kubernetes.io/instance: mysql-operator - app.kubernetes.io/version: 9.1.0-2.2.2 + app.kubernetes.io/version: 8.4.3-2.1.5 app.kubernetes.io/component: controller app.kubernetes.io/managed-by: mysql-operator app.kubernetes.io/created-by: mysql-operator diff --git a/helm/mysql-operator/Chart.yaml b/helm/mysql-operator/Chart.yaml index dbf1cb3e..30615c63 100644 --- a/helm/mysql-operator/Chart.yaml +++ b/helm/mysql-operator/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: "9.1.0-2.2.2" +appVersion: "8.4.3-2.1.5" name: mysql-operator description: MySQL Operator Helm Chart for deploying MySQL InnoDB Cluster in Kubernetes type: application diff --git a/tag.sh b/tag.sh index e8b0ced6..616b3ed8 100755 --- a/tag.sh +++ b/tag.sh @@ -6,4 +6,4 @@ SUFFIX='aarch64'; [ -n "$1" ] && SUFFIX=${1} -echo "9.1.0-2.2.2$SUFFIX" +echo "8.4.3-2.1.5$SUFFIX" diff --git a/tests/ci/registry/images-list.txt b/tests/ci/registry/images-list.txt index 90634989..ceeb6629 100644 --- a/tests/ci/registry/images-list.txt +++ b/tests/ci/registry/images-list.txt @@ -202,12 +202,12 @@ community-operator:8.2.0-2.1.1 mysql-operator:8.2.0-2.1.1 1 --- -community-operator:8.3.0-2.1.2 -mysql-operator:8.3.0-2.1.2 +community-operator:8.4.3-2.1.5 +mysql-operator:8.4.3-2.1.5 1 --- -community-operator:8.3.0-2.1.2 -mysql/community-operator:8.3.0-2.1.2 +community-operator:8.4.3-2.1.5 +mysql/community-operator:8.4.3-2.1.5 1 --- community-operator:8.4.0-2.1.3 diff --git a/tests/setup/defaults.py b/tests/setup/defaults.py index 29db816c..729275ca 100644 --- a/tests/setup/defaults.py +++ b/tests/setup/defaults.py @@ -27,7 +27,7 @@ "OPERATOR_TEST_EE_IMAGE_NAME", default="enterprise-operator") OPERATOR_VERSION_TAG = os.getenv( - "OPERATOR_TEST_VERSION_TAG", default="9.1.0-2.2.2") + "OPERATOR_TEST_VERSION_TAG", default="8.4.3-2.1.5") OPERATOR_OLD_VERSION_TAG = os.getenv( "OPERATOR_TEST_OLD_VERSION_TAG", default="8.0.31-2.0.7")