Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-11113

puppet_agent : Allow present and latest as package version



    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • puppet_agent
    • None
    • Night's Watch
    • 1
    • NW - 2021-07-14, NW - 2021-07-28
    • Not Needed
    • Needs Assessment


      Proposed PR: https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/565

      Original description:

      This pull requests intends to implement the package versions present and latest as valid package versions. According to #333, this was the case prior to commit c2206a7. The issue with #333 is that it is an outdated pull request that does not apply to the current state of main. This, along with the fact that the author of #333 did not agree to the CLA in over 2 years now, is why I am raising this as a separate pull request.

      Since there is no issues section in this project, I would also like to use this pull request as a discussion for this feature. The issue with the implementation as it is proposed in this pull request is that every puppet run will end with:

      Notice: Stopping run after puppet-agent upgrade. Run puppet agent -t or apply your manifest again to finish the transaction.

      when the version is set to present or latest. This is because the needs_upgrade? function in the puppet_agent_end_run type uses the Puppet::Util::Package.versioncmp function to compare the literal string present and latest with the actual version of the Puppet agent installed, e.g. 6.22.1, which will never be equal.

      I am not sure of a suitable fix for this and was hoping someone else could help.

      I stumbled upon this issue when I realized the pc_repo.repo file was no longer being managed by this module after removing setting puppet_agent::package_version to auto which in itself led to an issue where the Puppet agent would also be downgraded (despite the server being the same version as the client) anytime the Puppet agent upgraded through the package manager. This is with puppet_agent::collection set to puppet6 for both the main server and the agent, the puppetserver version being 6.15.3 and the puppet-agent version, prior to a catalogue pull, being 6.22.1 on both the main server and the agent.




            Unassigned Unassigned
            gabriel.nagy Gabriel Nagy
            0 Vote for this issue
            2 Start watching this issue



              Zendesk Support