compass
compass

Reputation: 347

RHEL service wouldn't start using Puppet

I was trying to set up gitlab using this module (https://github.com/sbadia/puppet-gitlab) with some modification to work with RVM and RHEL 6. I got everything working except the gitlab service wouldn't start.

The service is defined as:

 service {
    'gitlab':
      ensure     => running,
      pattern    => 'puma',
      hasrestart => true,
      enable     => true,
      hasstatus  => false,
      subscribe  => File['/etc/init.d/gitlab'],
  }

The related output from agent with debug enabled:

Debug: Service[gitlab](provider=redhat): Executing 'ps -ef'
Debug: Executing '/sbin/chkconfig gitlab'
Debug: Executing '/sbin/service gitlab start'
Debug: Executing '/sbin/chkconfig gitlab'
Notice: /Stage[main]/Gitlab::Server/Service[gitlab]/ensure: ensure changed 'stopped' to 'running'
Debug: /Stage[main]/Gitlab::Server/Service[gitlab]: The container Class[Gitlab::Server] will propagate my refresh even
t
Info: /Stage[main]/Gitlab::Server/Service[gitlab]: Unscheduling refresh on Service[gitlab]
Debug: Class[Gitlab::Server]: The container Stage[main] will propagate my refresh event
Debug: Finishing transaction 70257873749220

It seems the /sbin/service gitlab start got executed. But the service is not started (no entries in log either). However, if I manually run service gitlab start, it works fine.

I noticed that there is a line saying "Unscheduling refresh on Service[gitlab]". Not sure why and if it has anything to do with it. Any advice? Thanks.

Upvotes: 3

Views: 2331

Answers (1)

Marvin Pinto
Marvin Pinto

Reputation: 30980

This is what I suspect it comes down to:

You have set ensure => running yet provided no status command for puppet to check whether the service is actually running (hasstatus => false).

Have a look at this bugzilla comment for a bit more insight.

Upvotes: 1

Related Questions