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

pkg/fileutil: optimize file stats error #11997

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

tangcong
Copy link
Contributor

when I try to upgrade etcd cluster from v3.4 to v3.5, I failed to start etcd etcd process. I have to find solution from code, pr #11798 introduces this issue. it is better if we can print detail desired file permission in error log and add breaking change doc for it. thanks. @spzala

Jun 10 13:50:45 VM-test-ubuntu bash[11974]: {"level":"fatal","ts":"2020-06-10T13:50:45.510+0800","caller":"etcdmain/etcd.go:197","msg":"discovery failed","error":"cannot access data directory: directory \"/data/etcd.data\" exist without desired file permission. \"drwxr-xr-x\"","

@codecov-commenter
Copy link

Codecov Report

Merging #11997 into master will increase coverage by 0.41%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11997      +/-   ##
==========================================
+ Coverage   65.50%   65.92%   +0.41%     
==========================================
  Files         403      403              
  Lines       37320    37320              
==========================================
+ Hits        24447    24603     +156     
+ Misses      11337    11180     -157     
- Partials     1536     1537       +1     
Impacted Files Coverage Δ
pkg/fileutil/fileutil.go 63.63% <100.00%> (ø)
etcdserver/api/v3rpc/util.go 51.61% <0.00%> (-16.13%) ⬇️
auth/simple_token.go 79.83% <0.00%> (-9.25%) ⬇️
clientv3/leasing/cache.go 87.22% <0.00%> (-3.89%) ⬇️
proxy/grpcproxy/watch.go 89.94% <0.00%> (-2.96%) ⬇️
pkg/adt/interval_tree.go 84.71% <0.00%> (-2.51%) ⬇️
etcdserver/api/rafthttp/msgappv2_codec.go 69.56% <0.00%> (-1.74%) ⬇️
lease/leasehttp/http.go 62.77% <0.00%> (-1.46%) ⬇️
clientv3/watch.go 90.52% <0.00%> (-1.42%) ⬇️
etcdserver/api/v2http/client.go 88.32% <0.00%> (-1.28%) ⬇️
... and 17 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 3082a7d...63f51aa. Read the comment docs.

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

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

@tangcong thanks for this PR. I am working on small related PR and will modify this changelog as needed but lgtm except couple of suggestions

  • the changes are for both etcd data directory and the directory path when provided to automatically generate self-signed certificates for TLS connections with clients. So can you please try to cover both in the changelog?
  • the desired permission is 700 on Linux but for windows it's 777 so if you can modify the text accordingly that would be great.
    Thanks!

@tangcong
Copy link
Contributor Author

@spzala updated. thanks.

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

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

@tangcong thanks for quickly addressing my previous comments. It's almost lgtm, I have added couple comments inline. Thanks!

CHANGELOG-3.5.md Outdated Show resolved Hide resolved
CHANGELOG-3.5.md Outdated Show resolved Hide resolved
@spzala
Copy link
Member

spzala commented Jun 10, 2020

/cc @xiang90

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

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

lgtm
Thanks for addressing comments!

@spzala spzala mentioned this pull request Jun 12, 2020
@spzala
Copy link
Member

spzala commented Jun 15, 2020

CI failure is not related.

@spzala spzala merged commit af7128c into etcd-io:master Jun 15, 2020
@spzala
Copy link
Member

spzala commented Jun 26, 2020

@tangcong can you please cherry pick this to 3.4 and 3.3? Thanks!

@tangcong
Copy link
Contributor Author

@tangcong can you please cherry pick this to 3.4 and 3.3? Thanks!

it is minor changes. can you merge it in pr #12081 and #12082 ? thanks.

@tangcong
Copy link
Contributor Author

@spzala pr #12089 #12090. done

gyuho added a commit that referenced this pull request Jul 6, 2020
…97-origin-release-3.3

Automated cherry pick of #11997
gyuho added a commit that referenced this pull request Jul 6, 2020
…97-origin-release-3.4

Automated cherry pick of #11997
@spzala
Copy link
Member

spzala commented Jul 6, 2020

@spzala pr #12089 #12090. done

Thanks @tangcong

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.

3 participants