pingcap / pingcap/tidb-operator

log output is not clear when restore from a non-exist S3 file

Open
#4,536 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

Question

When I restore from S3 using a non-exist backup file, task will fail and pod will become error status.

image

When I investigate the log, it will show me that download backup file successfully and unarchive it failed.

image

Actually the root cause is rclone copyto do not return error when src file is not exist, and error happens at unarchive non-exist local file. I don't find a good way in rclone command to verify the existence of src, maybe use rclone ls src and check the result to.ensure the existence of src first is an acceptable method.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the restore-from-S3 workflow and the rclone copyto invocation described in the issue. Check how a missing source is reported before unarchive runs, and consider the work complete when the task fails with a clear missing-backup-file error instead of reporting a successful download followed by an unarchive failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go, kubernetes
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.