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

better handling of enable=delayed case for a systemd service

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.23.0, PUP 7.8.0
    • None
    • Night's Watch
    • 2
    • NW - 2021-06-02
    • Bug Fix
    • 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.
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support