Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Restored MongoDB is always creating for quite a few mins for pods are keep restarting #3964

Closed
ahjing99 opened this issue Jun 26, 2023 · 1 comment
Assignees
Labels
bug kind/bug Something isn't working
Milestone

Comments

@ahjing99
Copy link
Collaborator

ahjing99 commented Jun 26, 2023

kbcli version
Kubernetes: v1.25.8-gke.1000
KubeBlocks: 0.5.3-beta.8
kbcli: 0.5.3-beta.8

  1. Create mongodb cluster and do backup, then restore

      `kbcli cluster list-instances cluster-letcbo --namespace default `

NAME                       NAMESPACE   CLUSTER          COMPONENT   STATUS    ROLE        ACCESSMODE   AZ              CPU(REQUEST/LIMIT)   MEMORY(REQUEST/LIMIT)           STORAGE    NODE                                                  CREATED-TIME
cluster-letcbo-mongodb-0   default     cluster-letcbo   mongodb     Running   primary     ReadWrite    us-central1-c   200m / 200m          644245094400m / 644245094400m   data:2Gi   gke-yjtest-default-pool-ce006ea7-w18c/10.128.15.202   Jun 26,2023 19:32 UTC+0800
cluster-letcbo-mongodb-1   default     cluster-letcbo   mongodb     Running   secondary   Readonly     us-central1-c   200m / 200m          644245094400m / 644245094400m   data:2Gi   gke-yjtest-default-pool-ce006ea7-chjh/10.128.15.206   Jun 26,2023 19:31 UTC+0800
cluster-letcbo-mongodb-2   default     cluster-letcbo   mongodb     Running   secondary   Readonly     us-central1-c   200m / 200m          644245094400m / 644245094400m   data:2Gi   gke-yjtest-default-pool-ce006ea7-7n4n/10.128.15.201   Jun 26,2023 19:31 UTC+0800

 `kbcli cluster backup cluster-letcbo --type datafile --namespace default `

Backup backup-default-cluster-letcbo-20230626193705 created successfully, you can view the progress:
	kbcli cluster list-backups --name=backup-default-cluster-letcbo-20230626193705 -n default
check backup status

      `kbcli cluster list-backups cluster-letcbo --namespace default `

NAME                                           CLUSTER          TYPE       STATUS       TOTAL-SIZE   DURATION   CREATE-TIME                  COMPLETION-TIME   EXPIRATION
backup-default-cluster-letcbo-20230626193705   cluster-letcbo   datafile   InProgress                           Jun 26,2023 19:37 UTC+0800                     Jul 03,2023 19:37 UTC+0800
backup_status:datafile-InProgress
check backup status done
backup_status:backup-default-cluster-letcbo-20230626193705   cluster-letcbo   datafile   Completed                17s        Jun 26,2023 19:37 UTC+0800   Jun 26,2023 19:37 UTC+0800   Jul 03,2023 19:37 UTC+0800
cluster restore backup

      `kbcli cluster restore cluster-letcbo-backup --backup backup-default-cluster-letcbo-20230626193705 --namespace default `
  1. The new restored cluster is creating for more than 10 mins because the pods are restarted again after running
k get pod
NAME                                                    READY   STATUS            RESTARTS        AGE
cluster-letcbo-backup-mongodb-0                         3/3     Running           1 (2m39s ago)   4m56s
cluster-letcbo-backup-mongodb-1                         3/3     Running           0               15s
cluster-letcbo-backup-mongodb-2                         3/3     Running           0               4m56s

k get pod
NAME                                                    READY   STATUS            RESTARTS        AGE
cluster-letcbo-backup-mongodb-0                         3/3     Running           1 (2m43s ago)   5m
cluster-letcbo-backup-mongodb-1                         3/3     Running           0               19s
cluster-letcbo-backup-mongodb-2                         3/3     Terminating       0               5m

k get pod
NAME                                                    READY   STATUS              RESTARTS       AGE
cluster-letcbo-backup-mongodb-0                         0/3     ContainerCreating   0              14s
cluster-letcbo-backup-mongodb-1                         3/3     Running             0              108s
cluster-letcbo-backup-mongodb-2                         3/3     Running             0              60s
  1. After all pods restarted and turn to running, the cluster is running
@ahjing99 ahjing99 added the kind/bug Something isn't working label Jun 26, 2023
@ahjing99 ahjing99 added this to the Release 0.6.0 milestone Jun 26, 2023
@xuriwuyun
Copy link
Contributor

This behavior is expected in the 0.5.x release, the restore operations would restart the cluster after the cluster restore has completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants