sous-chefs / consul

Development repository for the consul cookbook

Home Page:https://supermarket.chef.io/cookbooks/consul

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

consul_service ignores program property

evandam opened this issue Β· comments

πŸ‘» Brief Description

Setting the program in the consul_service resource does not change the value of ExecStart in the Systemd unit file.

πŸ₯ž Cookbook version

5.0.0

πŸ‘©β€πŸ³ Chef-Infra Version

16.17.4

🎩 Platform details

Ubuntu 18.04 (test kitchen)

Steps To Reproduce

Sample cookbook:

consul_service 'service' do
  program '/my/custom/path'
  action %i(enable start)
end

Note service still points to /usr/local/bin/consul

# cat /etc/systemd/system/consul.service
[Unit]
Description=consul
Wants=network.target
After=network.target

[Service]
Environment="GOMAXPROCS=2" "PATH=/usr/local/bin:/usr/bin:/bin" "SHELL=/bin/false"
ExecStart=/usr/local/bin/consul agent -config-file=/etc/consul/chef.json -config-dir=/etc/consul/conf.d
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=TERM
User=consul
WorkingDirectory=/var/lib/consul

[Install]
WantedBy=multi-user.target

πŸš“ Expected behavior

ExecStart=/my/custom/path agent -config-file=/etc/consul/chef.json -config-dir=/etc/consul/conf.d

βž• Additional context

Worked prior to 5.0.0.

Fixed in #600 - thanks @ramereth!