apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
2.1k stars 170 forks source link

[BUG] mogdb cluster mogdb-basebackup backup restore error #6823

Open JashBook opened 7 months ago

JashBook commented 7 months ago

Describe the bug

To Reproduce Steps to reproduce the behavior:

  1. create cluster
    apiVersion: apps.kubeblocks.io/v1alpha1
    kind: Cluster
    metadata:
    name: mogdb-awtxoc
    namespace: default
    spec:
    clusterDefinitionRef: mogdb
    clusterVersionRef: mogdb-5.0.5
    terminationPolicy: Wipeout
    componentSpecs:
    - name: mogdb
      componentDefRef: mogdb
      replicas: 2
      resources:
        requests:
          cpu: 500m
          memory: 1Gi
        limits:
          cpu: 500m
          memory: 1Gi
      volumeClaimTemplates:
        - name: data
          spec:
            storageClassName:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 5Gi
  2. hscale 2 to 3
    kbcli cluster hscale mogdb-awtxoc --auto-approve --components mogdb --replicas 3 --namespace default
  3. mogdb-basebackup backup
    
    kbcli cluster backup mogdb-awtxoc --method mogdb-basebackup --namespace default

kubectl get backup NAME POLICY METHOD REPO STATUS TOTAL-SIZE DURATION CREATION-TIME COMPLETION-TIME EXPIRATION-TIME backup-default-mogdb-awtxoc-20240314162135 mogdb-awtxoc-mogdb-backup-policy mogdb-basebackup backuprepo-kbcli-test Completed 59039744 28s 2024-03-14T08:21:36Z 2024-03-14T08:22:03Z

4. mogdb-basebackup backup restore

kbcli cluster restore mogdb-awtxoc-backup --backup backup-default-mogdb-awtxoc-20240314162135 --namespace default

5. see error

kubectl get cluster NAME CLUSTER-DEFINITION VERSION TERMINATION-POLICY STATUS AGE mogdb-awtxoc-backup mogdb mogdb-5.0.5 WipeOut 63s

kubectl get pod NAME READY STATUS RESTARTS AGE restore-preparedata-4ff7f0f4-backup-default-mogdb-awtxoc--4xvkw 0/1 Init:0/1 0 115s restore-preparedata-4ff7f0f4-backup-default-mogdb-awtxoc--5n9ps 0/1 Error 0 31s restore-preparedata-4ff7f0f4-backup-default-mogdb-awtxoc--8jhmb 0/1 Init:0/1 0 115s restore-preparedata-4ff7f0f4-backup-default-mogdb-awtxoc--d2n9l 0/1 Error 0 115s restore-preparedata-4ff7f0f4-backup-default-mogdb-awtxoc--vdhnn 0/1 Init:0/1 0 8s

logs pod 

kubectl logs restore-preparedata-4ff7f0f4-backup-default-mogdb-awtxoc--d2n9l

gzip: stdin: unexpected end of file



**Expected behavior**
A clear and concise description of what you expected to happen.

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

**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
ahjing99 commented 6 months ago

Still failed https://github.com/apecloud/kubeblocks/actions/runs/8599504363/job/23563725102

ahjing99 commented 3 months ago

Still failed on 0.9.0-beta.41 https://github.com/apecloud/kubeblocks/actions/runs/9706734596/job/26791659503

ahjing99 commented 3 months ago

lower the severity since backup will be improved by mogdb team