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

Puppet agent module upgrade failing on Windows with nightly builds

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Hide

      puppet-agent upgrades with nightly builds on Windows are working

      Show
      puppet-agent upgrades with nightly builds on Windows are working
    • Night's Watch
    • 2
    • NW - 2020-11-11
    • Needs Assessment
    • Not Needed
    • Needs Assessment

    Description

      MODULES-10813 introduced a new powershell script that is executed on every Windows upgrade: prerequisites_check.ps1.

      This script checks whether the version in the MSI matches what $package_version we want to install.

      To install a nightly build, the user would pass something like 7.0.0.463.gf7e6640e to package_version. This gets munged by the puppet_agent module into 7.0.0.463 which is then given to the prerequisites_check.ps1 script.

      It appears that MSI packaging does not discern between released builds and nightly builds, as the versions reported by the MSI package are always of type MAJOR.MINOR.PATCH.

      This causes the puppet-agent upgrade with nightly packages to fail with the following message:

      Notice: /Stage[main]/Puppet_agent::Install::Windows/Exec[prerequisites_check.ps1]/returns: ERROR: The expected puppet-agent version(7.0.0.463) does NOT match the .msi version 7.0.0.  Installation will STOP!
      Error: 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe                   -NoProfile                   -NoLogo -NonInteractive                   C:\Users\ADMINI~1\AppData\Local\Temp\prerequisites_check.ps1 7.0.0.463 C:\ProgramData\Puppetlabs\packages\puppet-agent-7.0.0.463.gf7e6640e-x64.msi C:\Users\ADMINI~1\AppData\Local\Temp\puppet-2020_10_29-09_40-installer.log' returned 1 instead of one of [0]
      Error: /Stage[main]/Puppet_agent::Install::Windows/Exec[prerequisites_check.ps1]/returns: change from 'notrun' to ['0'] failed: 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe                   -NoProfile                   -NoLogo                   -NonInteractive                   C:\Users\ADMINI~1\AppData\Local\Temp\prerequisites_check.ps1 7.0.0.463 C:\ProgramData\Puppetlabs\packages\puppet-agent-7.0.0.463.gf7e6640e-x64.msi C:\Users\ADMINI~1\AppData\Local\Temp\puppet-2020_10_29-09_40-installer.log' returned 1 instead of one of [0]
      Notice: /Stage[main]/Puppet_agent::Install::Windows/Exec[install_puppet.ps1]: Dependency Exec[prerequisites_check.ps1] has failures: true
      

      In this case it would be enough to check only if the 7.0.0 part of the version matches.

      Attachments

        Issue Links

          Activity

            People

              gabriel.nagy Gabriel Nagy
              gabriel.nagy Gabriel Nagy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support