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: Fix dir permission check on Windows #11945

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

polyrabbit
Copy link
Contributor

@polyrabbit polyrabbit commented May 25, 2020

Permissions on Windows is different from *nix. This PR separates them.

@spzala

@cretz
Copy link

cretz commented May 25, 2020

I would have expected not to do a permission check on dirs in Windows instead of still doing the check and requiring 0777. However, if Windows always returns this on every directory, I suppose the effect is the same. So long as [embedded] etcd now runs on Windows, all good.

@polyrabbit
Copy link
Contributor Author

AFAIK, I suppose all NTFS file systems return 0777. But that's too much details, keep the scope to Windows is enough for now.

@polyrabbit polyrabbit force-pushed the fix-permission-on-Windows branch from eb2502e to e06006e Compare May 26, 2020 03:16
@polyrabbit polyrabbit requested a review from spzala May 26, 2020 03:53
@spzala
Copy link
Member

spzala commented May 27, 2020

@polyrabbit thanks for verifying the permission and commit title update.
LGTM /cc @xiang90 @gyuho @mitake can you please take a quick look? Thanks!

@spzala
Copy link
Member

spzala commented Jun 2, 2020

@cretz hi, can you please take a look to the changes or do a quick test in your env, and see if you are good with them? Thanks!

@cretz
Copy link

cretz commented Jun 2, 2020

@spzala - I'll have to setup a simple script to run embedded etcd...may be able to get to it in a few hours, I'll update if I can.

@spzala
Copy link
Member

spzala commented Jun 2, 2020

@cretz - sounds great, I really appreciate it, thank you so much!

@cretz
Copy link

cretz commented Jun 4, 2020

I have confirmed this works on Windows by simply putting go.etcd.io/etcd/v3@master in go mod and confirming the example at the top of https://pkg.go.dev/go.etcd.io/etcd/v3/embed?tab=doc failed until I added a replace directive to point to this locally cloned branch.

Ideally a Windows CI could be leveraged to save others from this kind of manual verification.

@spzala
Copy link
Member

spzala commented Jun 4, 2020

I have confirmed this works on Windows by simply putting go.etcd.io/etcd/v3@master in go mod and confirming the example at the top of https://pkg.go.dev/go.etcd.io/etcd/v3/embed?tab=doc failed until I added a replace directive to point to this locally cloned branch.

Ideally a Windows CI could be leveraged to save others from this kind of manual verification.

@cretz thanks much for verifying it. Will merge this PR later today!

@spzala spzala merged commit 49f91d6 into etcd-io:master Jun 4, 2020
gyuho added a commit that referenced this pull request Jun 26, 2020
…-upstream-release-3.3

Automated cherry pick of #11945
gyuho added a commit that referenced this pull request Jun 26, 2020
…-upstream-release-3.4

Automated cherry pick of #11945
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