apecloud / kubeblocks-addons

KubeBlocks add-ons.
Apache License 2.0
35 stars 39 forks source link

[BUG]Orchestrator mysql xtrabackup backup restore failed on Azure AKS #536

Open haowen159 opened 6 months ago

haowen159 commented 6 months ago

Describe the bug the restored cluster information is empty

k8 version
Kubernetes: v1.27.9
KubeBlocks: 0.8.3-beta.20
kbcli: 0.8.3-beta.17
WARNING: version difference between kbcli (0.8.3-beta.17) and kubeblocks (0.8.3-beta.20) 

To Reproduce Steps to reproduce the behavior: Expected behavior A clear and concise description of what you expected to happen. 1.create cluster

helm upgrade orc-80-proxy ./addons/mysql-cluster --install -n mysql-ha \
--set orchestrator.enable=true  \
--set orchestrator.serviceReference.namespace=mysql-ha \
--set orchestrator.serviceReference.port=80 \
--set orchestrator.serviceReference.endpoint=orc-cluster-orchestrator-orchestrator  \
--set proxysql.replicas=1 --set proxysql.enable=true

2.create backup

k8 cluster backup orc-80-proxy --name mysql-backup-policy-template --method xtrabackup --policy orc-80-proxy-mysql-backup-policy -n mysql-ha
Backup mysql-backup-policy-template created successfully, you can view the progress:
        kbcli cluster list-backups --name=mysql-backup-policy-template -n mysql-ha

3.backup status

         k8 cluster list-backups --name=mysql-backup-policy-template -n mysql-ha
NAME                           NAMESPACE   SOURCE-CLUSTER   METHOD       STATUS      TOTAL-SIZE   DURATION   CREATE-TIME                  COMPLETION-TIME              EXPIRATION   
mysql-backup-policy-template   mysql-ha    orc-80-proxy     xtrabackup   Completed   1463123      10s        May 17,2024 14:05 UTC+0800   May 17,2024 14:05 UTC+0800            

4.create restore cluster

k8 cluster restore orc-80-proxy-bp --backup  mysql-backup-policy-template -n mysql-ha
Cluster orc-80-proxy-bp created

5.see error

 k get cluster orc-80-proxy-bp -n mysql-ha
NAME              CLUSTER-DEFINITION   VERSION   TERMINATION-POLICY   STATUS   AGE
orc-80-proxy-bp   mysql                          Delete                        95s

the cluster status is empty!

  1. see pod
    kubectl get pod -l app.kubernetes.io/instance=orc-80-proxy-bp -n mysql-ha
    No resources found in mysql-ha namespace.

    there is no pod about this cluster!

  2. see events
    k8 cluster list-events orc-80-proxy-bp -n mysql-ha
    NAMESPACE   TIME                         TYPE     REASON                  OBJECT                    MESSAGE                                                                 
    mysql-ha    May 17,2024 14:07 UTC+0800   Normal   PreCheckSucceed         Cluster/orc-80-proxy-bp   The operator has started the provisioning of Cluster: orc-80-proxy-bp   
    mysql-ha    May 17,2024 14:07 UTC+0800   Normal   ApplyResourcesSucceed   Cluster/orc-80-proxy-bp   Successfully applied for resources 

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

shanshanying commented 6 months ago

BACKUP has required annotations to restore a cluster. But it still failes on re-store, with post-hook error

image