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

Service type should not retrieve ensure status when not needed

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.5.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Client 2016-03-23, Client 2016-04-20
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Managing service resources will no longer query their status if knowledge of that status is not needed, as in when 'ensure' is not specified in the resource. This provides a small performance improvement.

      Description

      The retrieve method of Puppet::Type always retrieves the ensure status, although it is not necessary. In some case, it can be costy.
      For Services, if we only set the "enable" parameter, it will retrieve the status of the service. If this retrieval takes ages, the ressource will loose time in something not needed.
      And because no Service Type parameter is dependant on whether the service is running or not, we can just skip the ensure status retrieval when there is no ensure parameter.

      This can be done by overriding Puppet::Type.retrieve in Puppet::Type::Service.

      A fix is ready, it should target 3.8.x or master branch ?

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  aimnor Romain Fihue
                  QA Contact:
                  Eric Thompson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: