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

Puppet errors when managing non-existent service on AIX

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.10.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Agent
    • Story Points:
      3
    • Sprint:
      AP 2017-02-08, AP 2017-02-22
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Prior to Puppet 4.10.0, puppet would report an error when ensuring a non-existent was not running on AIX. In Puppet 4.10.0, Puppet now considers this a no-op, in line with behavior on other *nix operating systems.
    • QA Risk Assessment:
      Automate
    • QA Risk Assessment Reason:
      This was caught by a customer

      Description

      Related to support escalation PE-19526

      When managing a non-existent service on AIX, get something like:

      Error: /Stage[main]/Main/Service[nothere]: Could not evaluate: Cannot get status of nothere, error was: Execution of '/usr/bin/lssrc -s nothere' returned 1: 0513-085 The nothere Subsystem is not on file.
      Wrapped exception:
      Execution of '/usr/bin/lssrc -s nothere' returned 1: 0513-085 The nothere Subsystem is not on file.
      

      The behavior of puppet with respect to managing non-existent services is non-standard across various OSes.

      On Ubuntu (systemd), a non-existent service raises no error, and does not even report its non-existence via ral:

      ☂ : puppet apply -e " service { 'foo' : ensure => stopped } "
      Notice: Compiled catalog for ubuntu16.localdomain in environment production in 0.06 seconds
      Notice: Applied catalog in 0.05 seconds
      ☂ : puppet resource service foobar ensure=stopped
      service { 'foobar':
        ensure => 'stopped',
      }
      

      On OSX (launchctl), it reports an error:

      ☂ : be puppet apply -e " service { 'foo' : ensure => stopped } "
      Notice: Compiled catalog for macbook-pro-2.local in environment production in 0.34 seconds
      Error: Unable to find launchd plist for job: foo
      Error: /Stage[main]/Main/Service[foo]/ensure: change from absent to stopped failed: Unable to find launchd plist for job: foo
      Notice: Applied catalog in 2.14 seconds
      ☂ : be puppet resource service foo ensure=stopped
      Error: Unable to find launchd plist for job: foo
      Error: /Service[foo]/ensure: change from absent to stopped failed: Unable to find launchd plist for job: foo
      service { 'foo':
        ensure => 'absent',
      }
      

      On Centos 7 (also systemd), same as ubuntu - no errors:

      [root@centos7 ~]# puppet apply -e " service { 'foo' : ensure => stopped } "
      Notice: Compiled catalog for centos7.localdomain in environment production in 0.07 seconds
      Notice: Applied catalog in 0.35 seconds
      [root@centos7 ~]# puppet resource service foo ensure=stopped
      service { 'foo':
        ensure => 'stopped',
      }
      

      Since AIX is primarily an RPM based system, it seems to make sense to go the route of not erroring when a service is not present (perhaps issuing a debug message if this is the case).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              moses Moses Mendoza
              QA Contact:
              Stan Duffy
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support