hashicorp / hashicorp/consul-template

Windows consul template failing

Open
#1,601 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
4.8k
Forks
801
Avg merge
4h 5m
Merged PRs (30d)
6

Description

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:

https://discuss.hashicorp.com/c/consul
https://groups.google.com/forum/#!forum/consul-tool

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 not
running the latest version, please upgrade before submitting an
issue.

### Configuration

```hcl
# Copy-paste your configuration files here. Only include what is necessary or
# what you've changed from defaults. Include all referenced configurations.

```

```liquid
# Copy-paste your Consul Template template here
```

```liquid
# Include sample data you reference in the template from Consul or Vault here.
```

### Command

```shell
# 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 : 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
https://github.com/hashicorp/consul-template/pull/1531/commits/c9036a408c3473387dbf28306d62a11826c4c97d.
Apologies i did created a request in consul discuss to no avail.

Thanks

### Steps to reproduce

1.
2.
3.

### References

Are there any other GitHub issues (open or closed) that should
be linked here? For example:
- GH-1234
- ...

Contributor guide

Open the contributing guide

Research direction

Start by tracing the writeToFile function used by the nginxcert.tpl template and inspect any related Windows tests or file-ownership handling. Reproduce the command on Windows with the owner set to Administrators and an empty permission argument; done means the intended arguments are accepted without the unsupported chown error or missing-argument failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.