Will updated configure file meta:
ConfigSpec: mysql-consensusset-config ConfigFile: my.cnf ComponentName: mysql ClusterName: smarte-xihksa
OpsRequest smarte-xihksa-reconfiguring-6qjjt created successfully, you can view the progress:
kbcli cluster describe-ops smarte-xihksa-reconfiguring-6qjjt
➜ ~ kbcli cluster describe smarte-xihksa
Name: smarte-xihksa Created Time: Jun 27,2024 15:25 UTC+0800
NAMESPACE CLUSTER-DEFINITION VERSION STATUS TERMINATION-POLICY
default apecloud-mysql ac-mysql-8.0.30-1 Running WipeOut
Endpoints:
COMPONENT MODE INTERNAL EXTERNAL
mysql ReadWrite smarte-xihksa-mysql.default.svc.cluster.local:3306
Topology:
COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME
mysql smarte-xihksa-mysql-0 follower Running us-central1-c gke-yjtest-default-pool-2619f239-4tr1/10.128.0.33 Jun 27,2024 15:31 UTC+0800
mysql smarte-xihksa-mysql-1 follower Running us-central1-c gke-yjtest-default-pool-2619f239-mmwv/10.128.0.34 Jun 27,2024 15:32 UTC+0800
mysql smarte-xihksa-mysql-2 leader Running us-central1-c gke-yjtest-default-pool-2619f239-vflk/10.128.0.31 Jun 27,2024 15:30 UTC+0800
Images:
COMPONENT TYPE IMAGE
mysql mysql infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/apecloud-mysql-server:8.0.30-5.beta3.20231215.ge77d836.14
Data Protection:
BACKUP-REPO AUTO-BACKUP BACKUP-SCHEDULE BACKUP-METHOD BACKUP-RETENTION RECOVERABLE-TIME
Show cluster events: kbcli cluster list-events -n default smarte-xihksa
componentName: mysql
scaleIn:
onlineInstancesToOffline:
smarte-xihksa-mysql-0
➜ ~ k create -f off.yaml
opsrequest.apps.kubeblocks.io/smarte-xihksa-hscaleoffinstance-xvw6r created
➜ ~ kbcli cluster describe smarte-xihksa
Name: smarte-xihksa Created Time: Jun 27,2024 15:25 UTC+0800
NAMESPACE CLUSTER-DEFINITION VERSION STATUS TERMINATION-POLICY
default apecloud-mysql ac-mysql-8.0.30-1 Running WipeOut
Endpoints:
COMPONENT MODE INTERNAL EXTERNAL
mysql ReadWrite smarte-xihksa-mysql.default.svc.cluster.local:3306
Topology:
COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME
mysql smarte-xihksa-mysql-1 follower Running us-central1-c gke-yjtest-default-pool-2619f239-mmwv/10.128.0.34 Jun 27,2024 15:32 UTC+0800
mysql smarte-xihksa-mysql-2 leader Running us-central1-c gke-yjtest-default-pool-2619f239-vflk/10.128.0.31 Jun 27,2024 15:30 UTC+0800
Images:
COMPONENT TYPE IMAGE
mysql mysql infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/apecloud-mysql-server:8.0.30-5.beta3.20231215.ge77d836.14
Data Protection:
BACKUP-REPO AUTO-BACKUP BACKUP-SCHEDULE BACKUP-METHOD BACKUP-RETENTION RECOVERABLE-TIME
Show cluster events: kbcli cluster list-events -n default smarte-xihksa
3. Hscale
➜ ~ kbcli cluster hscale smarte-xihksa --auto-approve --force=true --components mysql --replicas 5
OpsRequest smarte-xihksa-horizontalscaling-vql8d created successfully, you can view the progress:
kbcli cluster describe-ops smarte-xihksa-horizontalscaling-vql8d -n default
Conditions:
Type Status
PodReadyToStartContainers False
Initialized False
Ready False
ContainersReady False
PodScheduled True
Volumes:
dp-claim-tpl-data-smarte-xihksa-mysql-2:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: data-smarte-xihksa-mysql-2
ReadOnly: false
dp-datasafed-config:
Type: Secret (a volume populated by a Secret)
SecretName: tool-config-backuprepo-kbcli-test-gxqmbf
Optional: false
dp-datasafed-bin:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
kube-api-access-dqc4v:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors:
Tolerations: kb-data=true:NoSchedule
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
Normal Scheduled 7m19s default-scheduler Successfully assigned default/restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0mzzcs to gke-yjtest-default-pool-2619f239-4tr1
Warning FailedAttachVolume 7m19s attachdetach-controller Multi-Attach error for volume "pvc-f7a57f12-722f-4506-bf7e-714726955a53" Volume is already used by pod(s) smarte-xihksa-mysql-2
Warning FailedMount 7m17s kubelet MountVolume.SetUp failed for volume "dp-datasafed-config" : failed to sync secret cache: timed out waiting for the condition
➜ ~ kbcli version Kubernetes: v1.29.4-gke.1043002 KubeBlocks: 0.9.0-beta.39 kbcli: 0.9.0-beta.27
Hscale after hscaleoffinstance also failed on workflow with different stage and reason https://github.com/apecloud/kubeblocks/actions/runs/9676387823/job/26697239490
Cluster smarte-xihksa created
kbcli cluster configure smarte-xihksa --auto-approve --force=true --set loose_smartengine=ON,binlog_format=ROW,default_storage_engine=smartengine --components mysql --config-spec mysql-consensusset-config --config-file my.cnf
Will updated configure file meta: ConfigSpec: mysql-consensusset-config ConfigFile: my.cnf ComponentName: mysql ClusterName: smarte-xihksa
OpsRequest smarte-xihksa-reconfiguring-6qjjt created successfully, you can view the progress: kbcli cluster describe-ops smarte-xihksa-reconfiguring-6qjjt
➜ ~ kbcli cluster describe smarte-xihksa Name: smarte-xihksa Created Time: Jun 27,2024 15:25 UTC+0800 NAMESPACE CLUSTER-DEFINITION VERSION STATUS TERMINATION-POLICY default apecloud-mysql ac-mysql-8.0.30-1 Running WipeOut
Endpoints: COMPONENT MODE INTERNAL EXTERNAL mysql ReadWrite smarte-xihksa-mysql.default.svc.cluster.local:3306
Topology: COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME mysql smarte-xihksa-mysql-0 follower Running us-central1-c gke-yjtest-default-pool-2619f239-4tr1/10.128.0.33 Jun 27,2024 15:31 UTC+0800 mysql smarte-xihksa-mysql-1 follower Running us-central1-c gke-yjtest-default-pool-2619f239-mmwv/10.128.0.34 Jun 27,2024 15:32 UTC+0800 mysql smarte-xihksa-mysql-2 leader Running us-central1-c gke-yjtest-default-pool-2619f239-vflk/10.128.0.31 Jun 27,2024 15:30 UTC+0800
Resources Allocation: COMPONENT DEDICATED CPU(REQUEST/LIMIT) MEMORY(REQUEST/LIMIT) STORAGE-SIZE STORAGE-CLASS mysql false 500m / 500m 1Gi / 1Gi data:20Gi kb-default-sc
Images: COMPONENT TYPE IMAGE mysql mysql infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/apecloud-mysql-server:8.0.30-5.beta3.20231215.ge77d836.14
Data Protection: BACKUP-REPO AUTO-BACKUP BACKUP-SCHEDULE BACKUP-METHOD BACKUP-RETENTION RECOVERABLE-TIME
Show cluster events: kbcli cluster list-events -n default smarte-xihksa
apiVersion: apps.kubeblocks.io/v1alpha1 kind: OpsRequest metadata: generateName: smarte-xihksa-hscaleoffinstance- labels: app.kubernetes.io/instance: smarte-xihksa app.kubernetes.io/managed-by: kubeblocks namespace: default spec: type: HorizontalScaling clusterRef: smarte-xihksa force: true horizontalScaling:
➜ ~ k create -f off.yaml opsrequest.apps.kubeblocks.io/smarte-xihksa-hscaleoffinstance-xvw6r created
➜ ~ kbcli cluster describe smarte-xihksa Name: smarte-xihksa Created Time: Jun 27,2024 15:25 UTC+0800 NAMESPACE CLUSTER-DEFINITION VERSION STATUS TERMINATION-POLICY default apecloud-mysql ac-mysql-8.0.30-1 Running WipeOut
Endpoints: COMPONENT MODE INTERNAL EXTERNAL mysql ReadWrite smarte-xihksa-mysql.default.svc.cluster.local:3306
Topology: COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME mysql smarte-xihksa-mysql-1 follower Running us-central1-c gke-yjtest-default-pool-2619f239-mmwv/10.128.0.34 Jun 27,2024 15:32 UTC+0800 mysql smarte-xihksa-mysql-2 leader Running us-central1-c gke-yjtest-default-pool-2619f239-vflk/10.128.0.31 Jun 27,2024 15:30 UTC+0800
Resources Allocation: COMPONENT DEDICATED CPU(REQUEST/LIMIT) MEMORY(REQUEST/LIMIT) STORAGE-SIZE STORAGE-CLASS mysql false 500m / 500m 1Gi / 1Gi data:20Gi kb-default-sc
Images: COMPONENT TYPE IMAGE mysql mysql infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/apecloud-mysql-server:8.0.30-5.beta3.20231215.ge77d836.14
Data Protection: BACKUP-REPO AUTO-BACKUP BACKUP-SCHEDULE BACKUP-METHOD BACKUP-RETENTION RECOVERABLE-TIME
Show cluster events: kbcli cluster list-events -n default smarte-xihksa
➜ ~ kbcli cluster hscale smarte-xihksa --auto-approve --force=true --components mysql --replicas 5 OpsRequest smarte-xihksa-horizontalscaling-vql8d created successfully, you can view the progress: kbcli cluster describe-ops smarte-xihksa-horizontalscaling-vql8d -n default
➜ ~ k describe pod restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0mzzcs Name: restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0mzzcs Namespace: default Priority: 0 Node: gke-yjtest-default-pool-2619f239-4tr1/10.128.0.33 Start Time: Thu, 27 Jun 2024 15:36:10 +0800 Labels: app.kubernetes.io/instance=smarte-xihksa app.kubernetes.io/managed-by=kubeblocks-dataprotection app.kubernetes.io/name=apecloud-mysql apps.kubeblocks.io/component-name=mysql apps.kubeblocks.io/vct-name=data batch.kubernetes.io/controller-uid=17810edd-d55d-457d-a6ca-3f5f9ea9f309 batch.kubernetes.io/job-name=restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0 controller-uid=17810edd-d55d-457d-a6ca-3f5f9ea9f309 dataprotection.kubeblocks.io/restore=smarte-xihksa-mysql-50025482-preparedata-2 job-name=restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0 kubeblocks.io/volume-type=data Annotations:
Status: Pending
IP:
IPs:
Controlled By: Job/restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0
Init Containers:
dp-copy-datasafed:
Container ID:
Image: docker.io/apecloud/datasafed:0.2.0
Image ID:
Port:
Host Port:
Command:
/bin/sh
-c
/scripts/install-datasafed.sh /bin/datasafed
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Limits:
cpu: 0
memory: 0
Requests:
cpu: 0
memory: 0
Environment:
Mounts:
/bin/datasafed from dp-datasafed-bin (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-dqc4v (ro)
Containers:
restore:
Container ID:
Image: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/apecloud-xtrabackup:8.0
Image ID:
Port:
Host Port:
Command:
sh
-c
!/bin/bash
Conditions: Type Status PodReadyToStartContainers False Initialized False Ready False ContainersReady False PodScheduled True Volumes: dp-claim-tpl-data-smarte-xihksa-mysql-2: Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace) ClaimName: data-smarte-xihksa-mysql-2 ReadOnly: false dp-datasafed-config: Type: Secret (a volume populated by a Secret) SecretName: tool-config-backuprepo-kbcli-test-gxqmbf Optional: false dp-datasafed-bin: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit:
kube-api-access-dqc4v:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors:
Tolerations: kb-data=true:NoSchedule
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
Normal Scheduled 7m19s default-scheduler Successfully assigned default/restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0mzzcs to gke-yjtest-default-pool-2619f239-4tr1 Warning FailedAttachVolume 7m19s attachdetach-controller Multi-Attach error for volume "pvc-f7a57f12-722f-4506-bf7e-714726955a53" Volume is already used by pod(s) smarte-xihksa-mysql-2 Warning FailedMount 7m17s kubelet MountVolume.SetUp failed for volume "dp-datasafed-config" : failed to sync secret cache: timed out waiting for the condition
➜ ~ k get pod | grep smarte restore-preparedata-4dda3270-smarte-xihksa-mysql-scaling-0mzzcs 0/1 Init:0/1 0 7m42s smarte-xihksa-mysql-1 4/4 Running 0 11m smarte-xihksa-mysql-2 4/4 Running 0 13m ➜ ~ k get pvc | grep smarte data-smarte-xihksa-mysql-1 Bound pvc-1f7a5834-e3b5-44e0-b95b-041c18da7213 20Gi RWO kb-default-sc 18m
data-smarte-xihksa-mysql-2 Bound pvc-f7a57f12-722f-4506-bf7e-714726955a53 20Gi RWO kb-default-sc 18m
data-smarte-xihksa-mysql-3 Bound pvc-ff9bce5b-7115-40d2-9338-422ca036b75d 20Gi RWO kb-default-sc 7m48s
data-smarte-xihksa-mysql-4 Bound pvc-c65ec2ea-f359-40ce-994a-4bf605a233bf 20Gi RWO kb-default-sc 7m48s