-
Notifications
You must be signed in to change notification settings - Fork 500
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
Yinliang/backup and restore add adhoc backup and restore functison #316
Yinliang/backup and restore add adhoc backup and restore functison #316
Conversation
"mode": "restore", | ||
"user": "root", | ||
"password": to.Password, | ||
"storage.size": "10Gi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10Gi
may be too small for backup job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this setting just suit for my cluster, We can modify it during stress testing。
tests/cmd/e2e/main.go
Outdated
Image: "pingcap/tidb-operator:v1.0.0-beta.1-p2", | ||
Tag: "v1.0.0-beta.1-p2", | ||
Image: "pingcap/tidb-operator:latest", | ||
Tag: "latest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest -> master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tests/actions.go
Outdated
return false, nil | ||
} | ||
if job.Status.Succeeded == 0 { | ||
glog.Error("cluster [%s] back up job is not completed, please wait! ", to.ClusterName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return 0, err | ||
} | ||
|
||
rows, err := db.Query(fmt.Sprintf("SELECT count(*) FROM %s", tableName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var count int
if err := db.QueryRaw(...).Scan(&count); err != nil {
...
}
return count, nil
otherwise, you have to close rows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems all right, I‘ll change it in next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ingcap#316) * add restore and backup process
1.add create secret process
2.add bakcup process
3.add restore process
4.add some parameters via the values.yaml change.
5.use master branch to test
@weekface @zyguan @cwen0 @xiaojingchen PTAL