Closed tryan225 closed 7 years ago
problem here is the init script doesnt actually check to ensure rundeck has restarted https://github.com/rundeck/rundeck/blob/master/packaging/root/etc/rc.d/init.d/rundeckd
need to log an issue to that repo to add that to the init script
i think we could do a workaround in this cookbook with something like
service 'rundeckd' do
start_command "service rundeckd start && until curl '#{rundeck_url}'; do sleep 5; done"
restart_command "service rundeckd restart && until curl '#{rundeck_url}'; do sleep 5; done"
status_command "service rundeckd status && until curl '#{rundeck_url}'; do sleep 5; done"
end
another option here for a workaround is something like
ruby_block 'wait for rundeck startup' do
action :nothing
block do
require 'socket'
require 'timeout'
Timeout::timeout(1) { TCPSocket.new('127.0.0.1', 80).close }
end
retries node['rundeck']['service']['retries']
retry_delay node['rundeck']['service']['retry_delay']
subscribes :run, 'service[rundeckd]', :immediately
end
http://ruby-doc.org/stdlib-2.3.3/libdoc/timeout/rdoc/Timeout.html#method-c-timeout https://ruby-doc.org/stdlib-2.3.3/libdoc/socket/rdoc/TCPSocket.html#method-c-new
This was fixed in #133
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.