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

Refactor the SMF provider to implement enableable semantics

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 7.0.0
    • Component/s: None
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      3
    • Sprint:
      NW - 2020-10-28
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The SMF provider did not properly implement enableable semantics. For example, enabling a service also starts it, while disabling a service also stops it. That means if we do

      enable => true,

      ensure => stop

      The final state of the service is undefined – it will either be stopped (and disabled from starting up at boot) or running (and enabled to start at boot). We want it to be stopped, but enabled to start up again upon a reboot.

      After this commit the enable and ensure are independent operations where enable handles whether the service starts
      or stops at boot time, while ensure handles whether the service starts or stops in the current running instance
      Show
      The SMF provider did not properly implement enableable semantics. For example, enabling a service also starts it, while disabling a service also stops it. That means if we do enable => true, ensure => stop The final state of the service is undefined – it will either be stopped (and disabled from starting up at boot) or running (and enabled to start at boot). We want it to be stopped, but enabled to start up again upon a reboot. After this commit the enable and ensure are independent operations where enable handles whether the service starts or stops at boot time, while ensure handles whether the service starts or stops in the current running instance
    • QA Risk Assessment:
      Needs Assessment

      Description

      The SMF provider does not implement enableable semantics. For example, enabling a service also starts it, while disabling a service also stops it. That means if we do

      enable  => true,
      ensure => stop
      

      The final state of the service is undefined – it will either be stopped (and disabled from starting up at boot) or running (and enabled to start at boot). We want it to be stopped, but enabled to start up again upon a reboot.

      Work in this ticket consists of refactoring the SMF provider to properly implement enableable semantics so that we get rid of this confusing case.

       

      UPDATE: This will likely be targeted for Puppet 7 since it is a breaking change, and we could not land it in time for the Puppet 6.0 release. Closed PR is here: https://github.com/puppetlabs/puppet/pull/6993 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ciprian.badescu Ciprian Badescu
              Reporter:
              enis.inan Enis Inan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support