claranet / puppet-consul_template

A Puppet module to manage the config and jobs of Consul Template from Hashicorp
Apache License 2.0
30 stars 89 forks source link

consul-template systemd service start problem #84

Closed wyardley closed 7 years ago

wyardley commented 7 years ago

It looks like changing the service to use -config /path/to/dir was intentional: https://github.com/gdhbashton/puppet-consul_template/commit/66518ad65e0e138d6922ddd606263e81bcae90e7

however, I'm getting an error with the version of Consul we're running. The help page for consul-template has this: -config=<path> Sets the path to a configuration file on disk

# consul --version
Consul v0.6.4
Consul Protocol: 3 (Understands back to: 1)
# consul-template --version
consul-template v0.15.0
# service consul-template start
Redirecting to /bin/systemctl start  consul-template.service
# 
# service consul-template status -l
Redirecting to /bin/systemctl status  -l consul-template.service
consul-template.service - Consul-Template Daemon
   Loaded: loaded (/usr/lib/systemd/system/consul-template.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Tue 2016-11-08 19:22:06 UTC; 9s ago
  Process: 20989 ExecStart=/usr/local/bin/consul-template -config /etc/consul-template/config (code=exited, status=14)
 Main PID: 20989 (code=exited, status=14)

Nov 08 19:22:06 XXXXX consul-template[20989]: open : no such file or directory
Nov 08 19:22:06 XXXXX systemd[1]: consul-template.service: main process exited, code=exited, status=14/n/a
Nov 08 19:22:06 XXXXX systemd[1]: Unit consul-template.service entered failed state.
# /usr/local/bin/consul-template -config /etc/consul-template/config
2016/11/08 19:22:28 [INFO] consul-template v0.15.0
2016/11/08 19:22:28 [INFO] (runner) creating new runner (dry: false, once: false)
2016/11/08 19:22:28 [INFO] (clients) creating consul/api client
2016/11/08 19:22:28 [WARN] (clients) disabling consul SSL verification
2016/11/08 19:22:28 [INFO] (clients) creating vault/api client
2016/11/08 19:22:28 [INFO] (runner) creating Watcher
Consul Template returned errors:
open : no such file or directory
wyardley commented 7 years ago

D'oh, I see the issue now. It's an issue with a non-existent file in the config vs. complaining about the config file itself.