-
Notifications
You must be signed in to change notification settings - Fork 97
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
Implement etcd-backup-restore on OSS of Alicloud #108
Conversation
@minchaow Thank you for the PR. We will review it soon. Regarding test cases: Anyways, looking at
It looks like DB defragmentation ran on already defragmented etcd. By any chance, any other process calling defragmentation on etcd? I'm not able to reproduce it on master.
This issue is similar to etcd-io/etcd#8715 . Might have been triggered due to later release of go-codec library 1.1.2.
|
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.
Just skimmed thought it, will review it again. As suggested in previous comment please do the revendoring. Also, add the license details for SDK in https://github.com/gardener/etcd-backup-restore/blob/master/LICENSE.md#subcomponents.
@swapnilgm Thank you very much. I will modify my code asap and run the UT cases again according to your suggestion. Best regards! |
@swapnilgm , thanks for your suggestions very much. UT has passed when running inside the container, and the workaround for my second issue is workable as well. |
@swapnilgm, this PR is important for enabling gardener on alicloud, so could you please help review the code, the sooner the better, many thanks for you help! :) |
@minchaow Thanks for addressing the changes. I can understand the importance of the PR. We will review it soon. |
@shreyas-s-rao Please review the PR. |
Sorry my bad. Just received the access to AliCloud. |
Hi @shreyas-s-rao, code has changed according to suggestions, please help review again. Thanks a lot. |
@minchaow After running |
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.
@minchaow Thank you very much for the well-written PR! I have reviewed your PR, and have suggested a few changes in your code. Please address them. Other than those, there are few changes you will have to make in the documentation and code comments to include information about "OSS" as a new snapstore provider:
README.md
: line 118README.md
: UnderCloud Provider Credentials
, add a line about the env variable details for OSS.github/ISSUE_TEMPLATE/bug_report.md
: line 26pkg/snapstore/types.go
: line 23chart/values.yaml
: line 26
Also, once you run make revendor
, commit the changes along with the vendored files. It's fine if other files are added/modified in the vendor
directory, as Godep has a method to resolve dependencies, and a few vendor files will get changed here and there. Not an issue.
Run make revendor
in your normal dev env, so that github.com/gardener
doesn't get added as a vendor package.
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.
@minchaow Just a few more suggestions for changes. Kindly address them. Thanks.
@swapnilgm, @shreyas-s-rao, comments addressed, and changes pushed. Please help review. Thanks. |
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.
@minchaow Thank you for addressing my review comments and making the changes! I have just a couple of comments on the new code you added. Please address them. Thanks.
863bad7
to
d0dfa85
Compare
@shreyas-s-rao, comments addressed, and the commit pushed. |
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.
@minchaow Thanks for addressing my comments. I have just one last change. I caught it only now when running the tests multiple times, so I wasn't able to suggest this change in the previous reviews. Sorry for the trouble. 😅
@shreyas-s-rao, comments addressed. Thanks for your so careful review! 👍 😄 |
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.
@minchaow Thanks so much for addressing all the comments. LGTM! 👍🏼
What this PR does / why we need it:
Implement function of backing up and restoring etcd on OSS of Alicloud
Special notes for your reviewer:
• Failure [2.036 seconds]
Defrag Defragmentation [It] should defragment and reduce size of DB within time
/Workspace/go/src/github.com/gardener/etcd-backup-restore/pkg/etcdutil/defrag_test.go:53
Expected
: 258048
to be <
: 258048
/Workspace/go/src/github.com/gardener/etcd-backup-restore/pkg/etcdutil/defrag_test.go:69
Full Stack Trace
/Workspace/go/src/github.com/gardener/etcd-backup-restore/vendor/github.com/onsi/gomega/internal/assertion/assertion.go:75 +0x305
github.com/gardener/etcd-backup-restore/vendor/github.com/onsi/gomega/internal/assertion.(*Assertion).Should(0xc000938400, 0x1801ea0, 0xc0006fa570, 0x0, 0x0, 0x0, 0x1)
/Workspace/go/src/github.com/gardener/etcd-backup-restore/vendor/github.com/onsi/gomega/internal/assertion/assertion.go:28 +0x11f
github.com/gardener/etcd-backup-restore/pkg/etcdutil.glob..func1.1.2()
/Workspace/go/src/github.com/gardener/etcd-backup-restore/pkg/etcdutil/defrag_test.go:69 +0xc72
github.com/gardener/etcd-backup-restore/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0xc0002f0060, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Workspace/go/src/github.com/gardener/etcd-backup-restore/pkg/etcdutil/etcdutil_suite_test.go:42 +0xf7
testing.tRunner(0xc0001f4500, 0x164df60)
/usr/local/go/src/testing/testing.go:827 +0x163
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:878 +0x65a
However, when I ran on the latest master branch without my change, the same error was still happened. So it is confused me if it is my code causes this error.
panic: codecgen version mismatch: current: 8, need 10. Re-generate file: /Workspace/go/src/github.com/gardener/etcd-backup-restore/vendor/github.com/coreos/etcd/client/keys.generated.go
goroutine 1 [running]:
github.com/gardener/etcd-backup-restore/vendor/github.com/coreos/etcd/client.init.0()
/Workspace/go/src/github.com/gardener/etcd-backup-restore/vendor/github.com/coreos/etcd/client/keys.generated.go:45 +0x144
Ginkgo ran 1 suite in 4.835755187s
Test Suite Failed
Makefile:61: recipe for target 'test' failed
make: *** [test] Error 1
The same error was also happened when running on the latest master branch.
Release note: