Skip to content
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

Use absolute path for consul to satisfy systemd #270

Merged
merged 1 commit into from
Feb 2, 2016

Conversation

sh9189
Copy link
Contributor

@sh9189 sh9189 commented Jan 29, 2016

Also cache bundle output in travis to speed up tests
cc @johnbellone

@codecov-io
Copy link

Current coverage is 51.05%

Merging #270 into master will increase coverage by +2.38% as of e0713c6

@@            master    #270   diff @@
======================================
  Files            7       7       
  Stmts          378     378       
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            184     193     +9
  Partial          0       0       
+ Missed         194     185     -9

Review entire Coverage Diff as of e0713c6

Powered by Codecov. Updated on successful CI builds.

@legal90
Copy link
Contributor

legal90 commented Feb 1, 2016

I confirm - my PR #266 have introduced the error of systemd-based service. Reproduced on CentOS 7.1:

Feb 01 05:50:14 default-centos-71 systemd[1]: [/etc/systemd/system/consul.service:8] Executable path is not absolute, ignoring: "consul agent -config-file=/etc/consul/...sul/conf.d"
Feb 01 05:50:14 default-centos-71 systemd[1]: consul.service lacks ExecStart setting. Refusing.

It could be fixed by this way as well:

diff --git a/templates/default/systemd.service.erb b/templates/default/systemd.service.erb
index a5ebc0a..1b1df74 100644
--- a/templates/default/systemd.service.erb
+++ b/templates/default/systemd.service.erb
@@ -5,7 +5,7 @@ After=network.target

 [Service]
 Environment=<%= @environment.map {|key, val| %Q{"#{key}=#{val}"} }.join(' ') %>
-ExecStart=<%= @command %>
+ExecStart=/usr/bin/env <%= @command %>
 ExecReload=/bin/kill -<%= @reload_signal %> $MAINPID
 KillSignal=<%= @stop_signal %>
 User=<%= @user %>

johnbellone added a commit that referenced this pull request Feb 2, 2016
Use absolute path for consul to satisfy systemd
@johnbellone johnbellone merged commit 349622e into sous-chefs:master Feb 2, 2016
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants