ogom/cookbook-gitlab

Error in gitlab recipe

Closed this issue · 9 comments

================================================================================
Error executing action `start` on resource 'service[gitlab]'
================================================================================


Errno::ENOENT
-------------
No such file or directory - /etc/init.d/gitlab start


Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/gitlab/recipes/gitlab.rb

211: service "gitlab" do
212:   supports :start => true, :stop => true, :restart => true, :status => true
213:   action :enable
214: end
215:



Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/gitlab/recipes/gitlab.rb:211:in `from_file'

service("gitlab") do
  action [:enable]
  updated true
  supports {:start=>true, :stop=>true, :restart=>true, :status=>true}
  retries 0
  retry_delay 2
  service_name "gitlab"
  enabled true
  pattern "gitlab"
  startup_type :automatic
  cookbook_name :gitlab
  recipe_name "gitlab"
end

The file actually exists and sudo /etc/init.d/gitlab start just works...

ogom commented

Platform Ubuntu or CentOS ?

Ubuntu

ogom commented

vagrant destroy and vagrant up, but is not an error.

Doesn't help. BTW, creating the service and looks good:

[2013-09-06T07:04:01+00:00] INFO: template[/etc/init.d/gitlab] created file /etc/init.d/gitlab
[2013-09-06T07:04:01+00:00] INFO: template[/etc/init.d/gitlab] updated file contents /etc/init.d/gitlab
[2013-09-06T07:04:01+00:00] INFO: template[/etc/init.d/gitlab] mode changed to 755
[2013-09-06T07:04:01+00:00] INFO: service[gitlab] enabled
[2013-09-06T07:04:01+00:00] INFO: file[/home/git/.gitlab_start] created file /home/git/.gitlab_start
[2013-09-06T07:04:01+00:00] INFO: file[/home/git/.gitlab_start] owner changed to 1000
[2013-09-06T07:04:01+00:00] INFO: file[/home/git/.gitlab_start] group changed to 1001
...
[2013-09-06T07:04:07+00:00] INFO: template[/etc/postfix/main.cf] sending restart action to service[postfix] (delayed)
[2013-09-06T07:04:10+00:00] INFO: service[postfix] restarted
[2013-09-06T07:04:10+00:00] INFO: file[/home/git/.gitlab_start] sending start action to service[gitlab] (delayed)

What's the reason for .gitlab_start file anyway?

vagrant@vm-gitlab:~$ ls /etc/init.d/gitlab
/etc/init.d/gitlab
vagrant@vm-gitlab:~$ service gitlab start
env: /etc/init.d/gitlab: No such file or directory

Looks like some tool set git autocrlf to true. Sorry for the noise.