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

Refactor the SMF provider to implement enableable semantics

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 7.0.0
    • None
    • Night's Watch
    • 3
    • NW - 2020-10-28
    • Bug Fix
    • 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
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support