-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcdctl: restore should create a snapshot #6370
Conversation
Restore should create a snasphot. So the new db file can be sent to newly joined member.
Fixes #6361 |
@hongchaodeng I will write a few tests around this today + tomorrow. |
Not working.. |
@hongchaodeng It works for me. At least for the example you provided in that issue. One thing I noticed is that you use etcdctl instead of ./etcdctl in your example. Probably you did not update etcdctl but still used old etcdctl in your GOPATH or BIN PATH? |
Correct. Works now. |
@xiang90 |
@gyuho It seems to me that we have a bad abstraction in e2e testing around etcd process. etcdProcess should understand all its configuration. However, now we construct all args in the cluster conf. And then we pass the agrs into etcd process. So now it is very hard for us to just start on etcd process instead of creating a cluster. We should make etcd process be able to construct the args. |
@xiang90 |
Now we create args here https://github.com/coreos/etcd/blob/master/e2e/etcd_test.go#L243-L304 in etcdProcessClusterConfig. The created arg is here: https://github.com/coreos/etcd/blob/master/e2e/etcd_test.go#L130 which is totally obscure to etcd process. However, etcd process SHOULD understand all flags given to it. It should not be obscure. Or we cannot easily create an etcd process by giving it config. What we should do is to make etcd process understands ALL configuration. We should covert these configuration fields into args in etcd process, not etcdClusterConfiguration. |
If you try to test #6361, you will probably see the same issue. |
Ok, I will see if we can make it more configurable. |
I manually tested this in a few cases. Will add test cases to e2e later on, since we need quite a few changes to e2e to make testing easier. I want to unblock @hongchaodeng's work on the controller. |
Restore should create a snapshot. So the new db file
can be sent to newly joined member.
/cc @hongchaodeng Can you please give this a try?