-
Notifications
You must be signed in to change notification settings - Fork 781
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
Allow setting ownership by name #1541
Conversation
Introduced in 24cb142: An error in os.Stat would lead to a nil pointer dereference in the calling function
Hey @lukas-w, nice PR. I've looked it over and everything looks good. I want to pull it down and check it over locally to be sure, but I think I'll be able to merge it as is and it should make it into 0.28.0. Thanks! |
@eikenb I'm very sorry for ping you but there is any ETA when this PR will be merged? |
Sorry, 0.28.0 went out a bit early due to a customer need which bumped this to 0.29 and distracted me for a bit. I was able to pull it down and look it over though and it still looks good. In other words the answer is... Thanks for reminding me, I'll merge it in a few minutes. |
Just realized an issue. This changes the behavior in a backwards incompatible way. It wasn't an issue before as it was going in the same release as the original change and so there was no release. Sigh. I think I'm just going to keep it as a backwards incompatible change (mentioning it in the changelog) as that was the intention before the early release. @deblasis, if you happen to see this and wouldn't mind, would you chime in with your thoughts on this. I'm going to merge it but could add backwards compatibility to it after the fact if there is a need. Thanks. |
Removed the breaking-change label as that was mitigated by #1551 |
As proposed in #1531 (comment), this changes the new file ownership specification from integer
uid
/gid
to stringuser
/group
that can either be a decimal id or a user/group name. This is both for convenience and for future compatibility with Windows. This change allows us to implement Windows support in the future without changing the public interface in consul-template and Nomad. One catch in the context of Nomad is that user/group names would be looked up on the host, not e.g. inside the Docker container as users may expect.I also fixed a potential nil dereference via af770ec and made
Render(...)
fail when trying to set file ownership on Windows analogous to how it fails ifChmod
fails via5be1f70
.Tagging @eikenb because they kindly offered to review.