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

e2e: v2 backup test #5380

Merged
merged 1 commit into from
May 17, 2016
Merged

e2e: v2 backup test #5380

merged 1 commit into from
May 17, 2016

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented May 17, 2016

Fix #5367.

if err != nil {
t.Fatal(err)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

defer os.RemoveAll(backupDir)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just fixed. Thanks!

@gyuho
Copy link
Contributor Author

gyuho commented May 17, 2016

So these are the commands that are run by this test.

./bin/etcd --name testname0 --listen-client-urls http://localhost:20000 --advertise-client-urls http://localhost:20000 --listen-peer-urls http://localhost:20001 --initial-advertise-peer-urls http://localhost:20001 --initial-cluster="testname0=http://localhost:20001" --initial-cluster-token new --data-dir testname0.etcd
./bin/etcdctl --endpoints http://localhost:20000 backup --data-dir testname0.etcd --backup-dir test-backup.etcd
./bin/etcd --name testname0 --listen-client-urls http://localhost:20000 --advertise-client-urls http://localhost:20000 --listen-peer-urls http://localhost:20001 --initial-advertise-peer-urls http://localhost:20001 --initial-cluster="testname0=http://localhost:20001" --initial-cluster-token new --data-dir test-backup.etcd --force-new-cluster

Confirmed that this command panics if I run this manually, without @xiang90's fix.

But somehow when we run on e2e, it's not passing the message type ConfChangeRemoveNode, so doesn't panic even without the Xiang's panic.

Do you see anything that I am doing wrong here?

/cc @xiang90 @heyitsanthony

Thanks!

@@ -132,6 +132,7 @@ type etcdProcessConfig struct {
}

type etcdProcessClusterConfig struct {
dataDirPath string // for single-node cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be a prefix instead of a path so it can support multiple nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Will fix.

@gyuho
Copy link
Contributor Author

gyuho commented May 17, 2016

ah, when it starts, it deletes the data dir. That was why it wasn't panic-ing.

Will fix that too.

@gyuho
Copy link
Contributor Author

gyuho commented May 17, 2016

@heyitsanthony All addressed. PTAL.

Thanks.

args []string

dataDirPath string
usePreviousDataDir bool
Copy link
Contributor

Choose a reason for hiding this comment

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

keepDataDir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@heyitsanthony
Copy link
Contributor

lgtm

@gyuho
Copy link
Contributor Author

gyuho commented May 17, 2016

Thanks merging after all greens. Found some other errors.

@gyuho gyuho merged commit ecf1925 into etcd-io:master May 17, 2016
@gyuho gyuho deleted the backup_e2e_test branch May 17, 2016 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants