Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1371

puppet requires local config changes for init scripts to work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.4.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:

      Description

      When puppet is configured to manage it's own services it fails, due to broken init scripts for EL6

      Notice: /Stage[main]/Puppet::Server/Service[puppetmaster]/ensure: ensure changed 'stopped' to 'running'
      Info: /Stage[main]/Puppet::Server/Service[puppetmaster]: Unscheduling refresh on Service[puppetmaster]
      Notice: /Stage[main]/Puppet/Service[puppet]/ensure: ensure changed 'stopped' to 'running'
      Info: /Stage[main]/Puppet/Service[puppet]: Unscheduling refresh on Service[puppet]
       
      # service puppetmaster status
      puppet dead but subsys locked
      # service puppet status
      puppet dead but subsys locked
      # ps auwx |grep puppet
      puppet   10167  0.3  5.6 207052 109260 ?       Ssl  17:52   0:32 /usr/bin/ruby /usr/bin/puppet master
      root     13385  0.0  3.0 148236 59508 ?        Ss   19:37   0:00 /usr/bin/ruby /usr/bin/puppet agent
      root     15789  0.0  0.0 103236   832 pts/0    S+   20:08   0:00 grep puppet
      

      Looking into the configuration, I found that pidfiles were being stored in the vardir, whereas the init scripts expected them in /var/run/puppet

      # grep pid /etc/init.d/puppet
      pidfile=${PIDFILE-/var/run/puppet/agent.pid}
          daemonopts="--pidfile $pidfile"
          pidopts="-p $pidfile"
          killproc $pidopts $puppetd
          [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
          killproc $pidopts $puppetd -HUP
       
      # grep pid /etc/init.d/puppetmaster 
      pidfile=/var/run/puppet/master.pid
          daemonopts="--pidfile $pidfile"
          pidopts="-p $pidfile"
          killproc $pidopts $PUPPETMASTER
          status $pidopts $PUPPETMASTER
       
      # grep pid /var/log/messages 
      Jun 22 20:01:34 backup0 puppet-agent[14679]: Could not prepare for execution: Could not create PID file: /var/lib/puppet/run/agent.pid
      Jun 22 20:04:58 backup0 puppet-master[14918]: Could not run: Could not create PID file: /var/lib/puppet-server/run/master.pid
       
      # puppet agent --configprint pidfile
      /var/lib/puppet/run/agent.pid
       
      # puppet master --configprint pidfile
      /var/lib/puppet/run/master.pid
      

      There are no pidfile or rundir statements in my puppet configuration. Unfortunately, the only way to make it work is to override the defaults on EL6 systems

      puppet.conf:
        [agent]
      	pidfile = /var/run/puppet/agent.pid
        [master]
      	pidfile = /var/run/puppet/master.pid
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  redmine.exporter redmine.exporter
                • Votes:
                  5 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: