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

better handling of enable=delayed case for a systemd service

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.23.0, PUP 7.8.0
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2021-06-02
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Due to missing required features, error with unwanted message was given when trying to set a service to `delayed_start` on other operating systems than Windows. This fix improves Puppet's behaviour and the error message.
    • QA Risk Assessment:
      Needs Assessment

      Description

      [root@cloud ~]# puppet resource service puppet enable=delayedError: Could not set 'delayed' on enable: undefined method `delayed_start' for Service[puppet](provider=systemd):Puppet::Type::Service::ProviderSystemd
       Error: Could not set 'delayed' on enable: undefined method `delayed_start' for Service[puppet](provider=systemd):Puppet::Type::Service::ProviderSystemd
       Wrapped exception:
       undefined method `delayed_start' for Service[puppet](provider=systemd):Puppet::Type::Service::ProviderSystemd
       Error: /Service[puppet]/enable: change from 'true' to 'delayed' failed: Could not set 'delayed' on enable: undefined method `delayed_start' for Service[puppet](provider=systemd):Puppet::Type::Service::ProviderSystemd
       service
      { 'puppet': enable => 'true', provider => 'systemd', }

       

      Wouldn’t it be nicer if enable=>delayed resolved to enable=>true on Linux? That would prevent the user from having to creating extra Puppet logic for this parameter in cross-platform scenarios. If not, the resource should at least return a proper error that delayed is not supported on Linux.

      /cc: Kevin Reeuwijk

       

        Attachments

          Activity

            People

            Assignee:
            luchian.nemes Luchian Nemes
            Reporter:
            ciprian.badescu Ciprian Badescu
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support