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

puppet on solaris 11 should support exists? for services

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.9.0
    • Component/s: None
    • Labels:
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Before puppet 4.9.0, when querying a non-existent SMF service on solaris 11, puppet would return `ensure => stopped` for that service. Now puppet will return `ensure => absent` for the service, allowing a user to distinguish between truly stopped and non-existent services.
      Show
      Before puppet 4.9.0, when querying a non-existent SMF service on solaris 11, puppet would return `ensure => stopped` for that service. Now puppet will return `ensure => absent` for the service, allowing a user to distinguish between truly stopped and non-existent services.

      Description

      The smf provider for solaris is currently incapable of removing a service or understanding that a service does not exist.

      This means puppet cannot distinguish between a service that exists and is stopped/disabled from a nonexistent service.

      Ie. this (current output):

      -bash-4.1# puppet resource service foo
      service { 'foo':
        ensure => 'stopped',
        enable => 'false',
      }
      

      Should be this (desired output):

      -bash-4.1# puppet resource service foo
      service { 'foo':
        ensure => 'absent',
      }
      

      I should be able to do this, but can't:

      -bash-4.1# puppet resource service foo ensure=absent
      Error: Could not run: Parameter ensure failed on Service[foo]: Invalid value "absent". Valid values are stopped, running.
      

      Update

      • Per comment below, it does not make sense to ensure => absent on a service with SMF
      • Instead, just going with correcting the output for a non-existent service, so now it returns "ensure => absent" instead of "ensure => stopped"

        Attachments

          Activity

            People

            • Assignee:
              shawnferry Shawn Ferry
              Reporter:
              moses Moses Mendoza
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support