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

etcdserver, et al: add --unsafe-no-fsync flag #11946

Merged
merged 1 commit into from
May 27, 2020

Conversation

crawshaw
Copy link
Contributor

@crawshaw crawshaw commented May 25, 2020

This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes #11930

This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes etcd-io#11930.

Signed-off-by: David Crawshaw <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #11946 into master will decrease coverage by 0.17%.
The diff coverage is 32.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11946      +/-   ##
==========================================
- Coverage   66.40%   66.23%   -0.18%     
==========================================
  Files         403      403              
  Lines       37258    37273      +15     
==========================================
- Hits        24742    24686      -56     
- Misses      10992    11049      +57     
- Partials     1524     1538      +14     
Impacted Files Coverage Δ
clientv3/client.go 72.38% <0.00%> (-0.51%) ⬇️
embed/config.go 54.12% <ø> (ø)
etcdserver/api/v2v3/watcher.go 0.00% <0.00%> (ø)
etcdserver/config.go 79.51% <ø> (ø)
wal/wal.go 58.06% <0.00%> (-0.45%) ⬇️
etcdserver/storage.go 56.09% <33.33%> (-2.88%) ⬇️
etcdserver/raft.go 84.15% <50.00%> (-0.44%) ⬇️
embed/etcd.go 74.49% <100.00%> (+0.05%) ⬆️
etcdmain/config.go 84.07% <100.00%> (+0.07%) ⬆️
etcdserver/backend.go 58.00% <100.00%> (+0.85%) ⬆️
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 747ff75...66cb045. Read the comment docs.

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm /cc @xiang90 @jpbetz

@jpbetz
Copy link
Contributor

jpbetz commented May 27, 2020

Also add to CHANGELOG for 3.5 and Documentation/op-guide/configuration.md? lgtm to me otherwise.

@gyuho
Copy link
Contributor

gyuho commented May 27, 2020

@crawshaw Can we create a separate PR to add this change in CHANGELOG? Thanks!

@dims
Copy link
Contributor

dims commented Jun 5, 2020

Can we please backport this?

@jpbetz
Copy link
Contributor

jpbetz commented Jun 5, 2020

While we usually don't backport features to release branches, I think we should consider making an exception for this given that (a) it is intended to be used in test and (b) it has a lot of promise to speed up tests significantly. If this makes a noticeable dent in k8s test times, and I think it might, it could really help the project.

I've opened #11977 for the backport. Please discuss there.

@jpbetz
Copy link
Contributor

jpbetz commented Jun 5, 2020

Do we want this flag included in the etcd -h output? If so we need to update the usage:

etcd/etcdmain/help.go

Lines 26 to 31 in 49f91d6

usageline = `Usage:
etcd [flags]
Start an etcd server.
etcd --version

^ @crawshaw @gyuho

gyuho added a commit that referenced this pull request Jun 5, 2020
@gyuho
Copy link
Contributor

gyuho commented Jun 5, 2020

@jpbetz Oh, yes. we forgot. Can we update help page? thx!

gyuho added a commit that referenced this pull request Jun 22, 2020
maelvls added a commit to maelvls/cert-manager that referenced this pull request Mar 25, 2022
In [1], disabling fsync for development deployments of etcd is
suggested.

 [1]: etcd-io/etcd#11946

Signed-off-by: Maël Valais <[email protected]>
Co-authored-by: Tim Ramlot <[email protected]>
maelvls added a commit to maelvls/cert-manager that referenced this pull request Mar 25, 2022
Using --unsafe-no-fsync is OK for development deployments of etcd [1].
etcd relies on fsync for its consensus protocol.

 [1]: etcd-io/etcd#11946
 [2]: https://etcd.io/docs/v3.5/tuning/#disk
 [3]: https://etcd.io/docs/v3.5/faq/

Signed-off-by: Maël Valais <[email protected]>
Co-authored-by: Tim Ramlot <[email protected]>
maelvls added a commit to maelvls/cert-manager that referenced this pull request Mar 29, 2022
Using --unsafe-no-fsync is OK for development deployments of etcd [1].
etcd relies on fsync for its consensus protocol.

 [1]: etcd-io/etcd#11946
 [2]: https://etcd.io/docs/v3.5/tuning/#disk
 [3]: https://etcd.io/docs/v3.5/faq/

Signed-off-by: Maël Valais <[email protected]>
Co-authored-by: Tim Ramlot <[email protected]>
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.

--nosync development flag
5 participants