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

Persist failpoints across member restart #11913

Merged
merged 1 commit into from
Jun 4, 2020
Merged

Conversation

jpbetz
Copy link
Contributor

@jpbetz jpbetz commented May 18, 2020

Fix #11898

Noticed that if etcd is restarted, we lose track of any gofail failpoints. This PR persists them across restarts.

@gyuho
Copy link
Contributor

gyuho commented May 18, 2020

lgtm, thanks for the fix!

@jingyih
Copy link
Contributor

jingyih commented May 19, 2020

LGTM. Thanks!

zap.String("failpoint-http-addr", srv.Member.FailpointHTTPAddr),
zap.String("failpoint-addr", u.Host),
)
srv.etcdCmd = exec.Command(etcdPath, etcdFlags...)
srv.etcdCmd.Env = []string{"GOFAIL_HTTP=" + u.Host}
if failpoints != "" {
srv.etcdCmd.Env = append(srv.etcdCmd.Env, "GOFAIL_FAILPOINTS=" + failpoints)
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: gofmt is complaining this line

-		srv.etcdCmd.Env = append(srv.etcdCmd.Env, "GOFAIL_FAILPOINTS=" + failpoints)
+		srv.etcdCmd.Env = append(srv.etcdCmd.Env, "GOFAIL_FAILPOINTS="+failpoints)

@gyuho gyuho merged commit 237c8b5 into etcd-io:master Jun 4, 2020
@gyuho
Copy link
Contributor

gyuho commented Jun 4, 2020

Manually fixed fmt.

@jpbetz
Copy link
Contributor Author

jpbetz commented Jun 4, 2020

Thanks @gyuho! I forgot about this one somehow in everything else going on. Appreciate you getting it merged.

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.

failpoint functional testing not covering etcd startup well
3 participants