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

backup: fix issue 1657 (#2071) #2079

Merged
merged 6 commits into from
Mar 31, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Mar 31, 2020

cherry-pick #2071 to release-1.1


What problem does this PR solve?

fixes #1657

What is changed and how does it work?

create a stdout pipe from the exec process, and read the pipe message in a for loop, If the output meesage with ERROR, add to the backup status message information

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    It seems the log will output intime and the backup status messsage is
  status:
    backupPath: ""
    backupSize: 0
    commitTs: ""
    conditions:
    - lastTransitionTime: "2020-03-30T12:14:02Z"
      message: ""
      reason: ""
      status: "True"
      type: Scheduled
    - lastTransitionTime: "2020-03-30T12:14:03Z"
      message: ""
      reason: ""
      status: "True"
      type: Running
    - lastTransitionTime: "2020-03-30T12:14:36Z"
      message: "cluster cluster/sa-backup-s3, wait pipe message failed, errMsg [2020/03/30
        12:14:36.196 +00:00] [ERROR] [push.go:106] [\"backup occur unknown error\"]
        [error=\"Io(Custom { kind: Other, error: \\\"failed to put object Couldn\\\\'t
        find AWS credentials in environment, credentials file, or IAM role.\\\" })\"]
        [stack=\"github.com/pingcap/log.Error\\n\\t/go/pkg/mod/github.com/pingcap/log@v0.0.0-20200117041106-d28c14d3b1cd/global.go:42\\ngithub.com/pingcap/br/pkg/backup.(*pushDown).pushBackup\\n\\t/home/jenkins/agent/workspace/build_br_master/go/src/github.com/pingcap/br/pkg/backup/push.go:106\\ngithub.com/pingcap/br/pkg/backup.(*Client).backupRange\\n\\t/home/jenkins/agent/workspace/build_br_master/go/src/github.com/pingcap/br/pkg/backup/client.go:404\\ngithub.com/pingcap/br/pkg/backup.(*Client).BackupRanges.func2\\n\\t/home/jenkins/agent/workspace/build_br_master/go/src/github.com/pingcap/br/pkg/backup/client.go:316\"]\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,
        err: exit status 1"
      reason: BackupDataToRemoteFailed
      status: "True"
      type: Failed
    timeCompleted: null
    timeStarted: null

Code changes

  • Has Go code change

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DanielZhangQD
Copy link
Contributor

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 31, 2020

Your auto merge job has been accepted, waiting for 2068

@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 31, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 31, 2020

/run-all-tests

@cofyc cofyc merged commit 1ac8f7f into pingcap:release-1.1 Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants