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

Puppet Agent fails to install on a Windows VM if no software that uses Windows Installer was previously installed

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch
    • Story Points:
      5
    • Sprint:
      NW - 2020-08-18
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Fixes a regression introduced in 5.5.21/6.17.0 and allows user to install the package when `HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components` is not existing(this can happen on new installed Windows where no package was installed using Windows Installer)

      Also:
      - the install will now fail if registry cleanup was not successful (could happen in UAC context if install process is not elevated).
      - the registry cleanup can be skipped (to allow installation in UAC context/not elevated process) setting SKIP_NSSM_REGISTRY_CLEANUP install property to true (this can trigger the initial problem from https://tickets.puppetlabs.com/browse/PA-3175, DHCP Server service or other services restart)
      Show
      Fixes a regression introduced in 5.5.21/6.17.0 and allows user to install the package when `HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components` is not existing(this can happen on new installed Windows where no package was installed using Windows Installer) Also: - the install will now fail if registry cleanup was not successful (could happen in UAC context if install process is not elevated). - the registry cleanup can be skipped (to allow installation in UAC context/not elevated process) setting SKIP_NSSM_REGISTRY_CLEANUP install property to true (this can trigger the initial problem from https://tickets.puppetlabs.com/browse/PA-3175, DHCP Server service or other services restart)
    • QA Risk Assessment:
      Needs Assessment

      Description

      When a package is installed on Windows that uses windows installer, the following registry key is created: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components'

      In 6.17.0 we've attempted to fix the network restarts on Puppet Agent upgrades by tricking the Windows installer that nssm.exe provisioned by an earlier installation was not part of the package: https://github.com/puppetlabs/puppet-agent/blob/master/resources/windows/wix/customactions.wxs.erb#L231

      However, if no other package was installed that uses Windows Installer then the registry key 

      HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components' does not exist, and the Puppet Agent installation fails with the following error:

      Action start 13:19:46: RemoveLegacyNssmRegistryKey.
      WixQuietExec64:  Get-ChildItem : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\' 
      WixQuietExec64:  because it does not exist.
      WixQuietExec64:  At line:1 char:1
      WixQuietExec64:  + Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Instal ...
      WixQuietExec64:  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      WixQuietExec64:      + CategoryInfo          : ObjectNotFound: (HKLM:\SOFTWARE\...rData\S-1-5-18\:String) , ItemNotFound 
      WixQuietExec64:     Exception
      WixQuietExec64:      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
      WixQuietExec64:   
      WixQuietExec64:  Get-ChildItem : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\' 
      WixQuietExec64:  because it does not exist.
      WixQuietExec64:  At line:1 char:265
      WixQuietExec64:  + ... prop } } }; Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVe ...
      WixQuietExec64:  +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      WixQuietExec64:      + CategoryInfo          : ObjectNotFound: (HKLM:\SOFTWARE\...rData\S-1-5-18\:String) , ItemNotFound 
      WixQuietExec64:     Exception
      WixQuietExec64:      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
      WixQuietExec64:   
      WixQuietExec64:  Error 0x80070001: Command line returned an error.
      WixQuietExec64:  Error 0x80070001: QuietExec64 Failed
      WixQuietExec64:  Error 0x80070001: Failed in ExecCommon method
      CustomAction RemoveLegacyNssmRegistryKey returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

       

        Attachments

          Activity

            People

            Assignee:
            ciprian.badescu Ciprian Badescu
            Reporter:
            mihai.buzgau Mihai Buzgau
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support