Uploaded image for project: 'Puppet Agent'
  1. Puppet Agent
  2. PA-3545

puppet_agent : Upgrading Windows agent from 5.5.18 to 6.19.1 fails with `ScriptHalted` error

    XMLWordPrintable

Details

    • Night's Watch
    • 3
    • NW - 2021-01-20, NW - 2021-02-03
    • Customer Feedback
    • 42338
    • 1
    • Bug Fix
    • Hide
      When installing some of the previous Puppet Agent versions on Microsoft Windows, registry references to `nssm.exe` were removed due to PA-3263. Upgrading to the affected versions will trigger a Windows SecureRepair sequence and will fail if any of the files delivered in the original *.msi package are missing. To work around this issue, the *.msi file for the currently installed version has to be placed in the `C:\Windows\Installer` folder prior to upgrading.
      To fix this we now replace the `nssm.exe` registry value with an empty string instead of removing the registry key to avoid triggering Windows SecureRepair.
      Show
      When installing some of the previous Puppet Agent versions on Microsoft Windows, registry references to `nssm.exe` were removed due to PA-3263 . Upgrading to the affected versions will trigger a Windows SecureRepair sequence and will fail if any of the files delivered in the original *.msi package are missing. To work around this issue, the *.msi file for the currently installed version has to be placed in the `C:\Windows\Installer` folder prior to upgrading. To fix this we now replace the `nssm.exe` registry value with an empty string instead of removing the registry key to avoid triggering Windows SecureRepair.
    • Needs Assessment

    Description

      Basic Info
      Module Version: 4.2.0
      Puppet Version: 5.5.18
      OS Name/Version: Agents on Windows Server 2016, primary server on RHEL 7

      The behavior in MODULES-10818 affects upgrades from 5.5.18 to 6.19.1, despite the known issue in the module suggesting upgrades from agents newer than 5.5.16 are not affected.

      This affects upgrades from a clean install of 5.5.18, but not upgrades where a prior version of puppet agent was installed and upgraded to 5.5.18 before being upgraded to 6.19.1.

      If this is the same issue as MODULES-10818, I would expect clean installs of any agent version prior to 5.5.21, when upgrading to agent version 5.5.21 or newer, to fail in this manner. However, the guidance in the puppet_agent module known issues suggests only Agent 5.5.16 and older are affected:

      If the upgrade is from Puppet 5 prior to 5.5.17 or Puppet 6 prior to 6.8.0 to newer version and msi_move_locked_files is set to true, Puppet can get into a state where puppet --version reports the older version(5.5.16) while the package reported by Windows is the new version(5.5.17). To recover from this case ADDLOCAL=ALL must be added to install_options

      Desired Behavior:

      The upgrade from 5.5.18 works without error, as suggested by the known issues: https://github.com/puppetlabs/puppetlabs-puppet_agent#known-issues

      Actual Behavior:

      The upgrade fails with event 'Failed previous installation with: ScriptHalted'. The agent installer log returns error 1316.

      Reported failure:

      "2020-12-08T16:18:41.0000000+04:00","18642","Error","The description for Event ID '3' in Source 'Puppet' cannot be found.  The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them.  The following information is part of the event:'Failed previous installation with: ScriptHalted

      Installer log:

      MSI (s) (4C:00) [17:32:21:586]: Using cached product context: machine assigned for product: FD6F777CFEA53FB459673B2E6FF853BF
      MSI (s) (4C:00) [17:32:21:586]: Determining source type
      MSI (s) (4C:00) [17:32:21:586]: Note: 1: 2203 2: C:\Windows\Installer\puppet-agent-x64.msi 3: -2147287038 
      MSI (s) (4C:00) [17:32:21:586]: Note: 1: 1316 2: C:\Windows\Installer\puppet-agent-x64.msi 
      MSI (s) (4C:00) [17:32:21:586]: SECREPAIR: Error determining package source type
      MSI (s) (4C:00) [17:32:21:586]: SECUREREPAIR: SecureRepair Failed. Error code: 5244CA8160
      MSI (s) (4C:00) [17:32:21:586]: Product: Puppet Agent (64-bit) -- Error 1316. The specified account already exists.

      Workaround

      Manually copy puppet-agent-x64.msi to c:\windows\installer.

      Add ADDLOCAL=ALL to the array of install_options in the puppet_agent resource.

      Attachments

        Issue Links

          Activity

            People

              luchian.nemes Luchian Nemes
              garrett.guillotte Garrett Guillotte
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support