pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.2k stars 490 forks source link

br: logStop not working #5249

Open derhoerit opened 11 months ago

derhoerit commented 11 months ago

Bug Report

What version of Kubernetes are you using? 1.27

What version of TiDB Operator are you using? 1.5.0

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?? do-block-storage (default), do-block-storage-retain, do-block-storage-xfs , do-block-storage-xfs-retain

What's the status of the TiDB cluster pods? All Running

What did you do?

  1. Deployed TiDB Via Kubernetes
  2. Setup https://docs.pingcap.com/tidb-in-kubernetes/stable/backup-to-aws-s3-using-br#log-backup
  3. Delete Backup without stopping backup Job first
  4. Rerun job
  5. Error Occured, try to edit backup by edit logStop: true
  6. Nothing happens, try to delete backup and apply config again with logStop: true appended
  7. Nothing happens. Still Error: It supports single stream log task currently: [BR:Stream:ErrStreamLogTaskExist]stream task already exists

What did you expect to see? Backup state stopped

What did you see instead? Error: It supports single stream log task currently: [BR:Stream:ErrStreamLogTaskExist]stream task already exists I see in my S3 the backup is still running. But i can't debug and make it stop.

derhoerit commented 11 months ago

I try to add cleanPolicy: OnFailure just testing is the edited yaml is working or not. After adding that, the clean policy is running and backup is deleted. But the backup is still running in background process.

fanjlii commented 2 months ago

I also encountered this problem

csuzhangxc commented 2 months ago

The log backup is running in TiKV (in the background), currently, it doesn't support to be stopped via Backup CR.

derhoerit commented 2 months ago

@fanjlii I have found a way how to stop it. By using tidb community tollkit. Please see this: https://docs.pingcap.com/tidb/stable/br-pitr-manual#stop-and-restart-a-backup-task

fanjlii commented 2 months ago

@fanjlii I have found a way how to stop it. By using tidb community tollkit. Please see this: https://docs.pingcap.com/tidb/stable/br-pitr-manual#stop-and-restart-a-backup-task Thx, I later delete the etcd data directly and it works fine. tiup ctl:v7.5.0 etcd del"/tidb/br-stream/info/log-backup"