-
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
Windows consul template failing #1601
Comments
Hey @tsiamer, thanks for reporting this. I'm working this a bit blind as I don't have a windows machine to test on, but looking through the code it seems like this form should work on Windows...
It should skip Chown if the user/group are blanks and Chmod has limited support but ignores what it doesn't use, so that should work. It's hard to tell exactly what you tried but it looked like all your cases had the user/group set which is unsupported by Windows but (as I said above) is skipped if set to blanks. Please let me know if this doesn't fix it and, if it doesn't, please provide the template snippets you tried. Thanks and good luck! |
Hi Eikenb, thanks again for your help, if i leave the permission blank, it errors out with missing args. {{- with pkiCert "pki_int/issue/nginx" "ttl=10m" "common_name=test.exampple.com" -}} if you i put local admin: {{- with pkiCert "pki_int/issue/nginx" "ttl=10m" "common_name=test.exampple.com" -}} It complains about "0644" chown not supported by windows. Thanks |
Thanks for the quick reply. Weird... that first version seems like it should work and the second should give a "syscall.EWINDOWS [..] error, wrapped in *PathError." Sounds like it is almost getting the arguments in the wrong order, but they are fixed position arguments so that doesn't seem possible. I think this might need to wait until I get a chance to reproduce it on Windows... I currently don't have a setup for that. |
Thank you i tried many options but it just wont work, hopefully you will get it working. Thanks |
Please note that the Consul Template issue tracker is reserved
for bug reports and enhancements. For general usage questions,
please use the Consul Community Portal or the Consul mailing list:
Please try to simplify the issue as much as possible and include all the
details to replicate it. The shorter and simpler the bug is to reproduce the
quicker it can be addressed. Thanks.
Consul Template version
consul-template_0.29.1
Run
consul-template -v
to show the version. If you are notrunning the latest version, please upgrade before submitting an
issue.
Configuration
Command
# Place your Consul Template command here
Debug output
Provide a link to a GitHub Gist containing the complete debug
output by running with
-log-level=trace
.Expected behavior
What should have happened?
Actual behavior
What actually happened?
Consul template windows failing , i checked here:
Allow setting ownership by name by lukas-w · Pull Request #1541 · hashicorp/consul-template · GitHub, but seems we cant omit the permission part, getting the error below chown nginx.key: not supported by windows when writing the key.
2022-07-14T19:05:49.524+0100 [ERR] (cli) nginxcert.tpl: execute: template: :5:11: executing “” at <writeToFile “nginx.key” “test”
“Administrators” “”>: error calling writeToFile: # chown nginx.key: not supported by windows
writeToFile “nginx.key” “test” “Administrators” "" if i leave the permission blank it errors out with missing args.
When i test with a user not member of nay groups, it gives the same above error, missing args
c9036a4.
Apologies i did created a request in consul discuss to no avail.
Thanks
Steps to reproduce
References
Are there any other GitHub issues (open or closed) that should
be linked here? For example:
The text was updated successfully, but these errors were encountered: