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

Some Solaris Init services are not functional with Puppet 5



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 5.3.3
    • Fix Version/s: PUP 5.3.4, PUP 5.4.0
    • Component/s: None
    • Labels:
    • Environment:

      PE 2017.3.2 with Solaris 10

    • Template:
      PUP Bug Template
    • Team:
      Platform Core
    • Sprint:
      Platform Core KANBAN
    • Method Found:
      Customer Feedback
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      This updates the command used to start services on Solaris, so that Puppet no longer abandons certain services before they are properly started.
    • QA Risk Assessment:
      No Action


      The service resource with the init provider in puppet 5.3.3 does not work for all services in Solaris. The service start is called, however the service is never started. This is a regression from 4.10.8. The following is always seen, however the script is never fully called and the service does not start.

      Debug: Executing: '/etc/init.d/splunk status'
      Debug: Executing: '/usr/bin/ctrun -l none /etc/init.d/splunk start'
      Notice: /Stage[main]/Main/Service[splunk]/ensure: ensure changed 'stopped' to 'running'

      Calling the init script manually will successfully start the service and produce an exit code of 0.

      Init based services on Solaris 10 use `ctrun` to create a new contract. It looks like the ctrun contract lifetime may be the issue as it is configured to immediately orphan the contract. When the contract is immediately orphaned and the service takes several seconds to start the service may be aborted. I am not sure why this behavior changed from 4.10.8 to 5.3.3 as the code is the same, so it may have to do with the new ruby version.

      I did some basic testing on this and found that if we switch the lifetime to child instead of none in the init provider, the init script is successfully run and services is started in it's own contract.

      [process contract 137]
        3955  splunkd -p 8089 start
          3956  splunkd -p 8089 start
            3996  /opt/splunk/bin/splunkd instrument-resource-usage -p 8089
            3997  /opt/splunk/bin/python -O /opt/splunk/lib/python2.7/site-packages/splunk/appser

      Since we expect that the init script return, it would make sense to utilize the child, but I am uncertain of the overall impact of this change. From the man page:

         ctrun exits when the command exits, regardless of whether the contract is empty.
         ctrun exits only when the contract exits. This is the default.
         ctrun exits immediately, orphaning the contract.




            jarret.lavallee Jarret Lavallee
            0 Vote for this issue
            7 Start watching this issue



                Zendesk Support