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

puppet_agent : upgrading windows agent from 5.5.16 to 5.5.21 is failing with `ScriptHalted` error.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: puppet_agent
    • Labels:
    • Template:
      MODULES Bug Template
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2020-10-14, NW - 2020-10-28
    • Method Found:
      Needs Assessment
    • Zendesk Ticket IDs:
      40867,41066,42338
    • Zendesk Ticket Count:
      3
    • Release Notes:
      Bug Fix
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 4.1.1
      Puppet Version: 2018.1.16
      OS Name/Version: Windows 2012 R2

      My Windows node is not able to upgrade to 5.5.21.  In my debug puppet run, I see the following message. It creates the puppet_agent_upgrade_failure.log which has the error: ScriptHalted

      0;36mDebug: Checking for Error logfile C:/ProgramData/PuppetLabs/puppet/cache/state/puppet_agent_upgrade_failure.log
      Debug: Exec[install_puppet.ps1](provider=windows): Executing check 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -NoLogo
      -NonInteractive -Command {$CurrentVersion = [string](facter.bat -p aio_agent_version); if ($CurrentVersion -eq '5.5.21') { exit 0;
      } exit 1; }.Invoke()'
      Debug: Executing: 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -NoLogo -NonInteractive
      -Command {$CurrentVersion = [string](facter.bat -p aio_agent_version); if ($CurrentVersion -eq '5.5.21') { exit 0; }
      exit 1; }.Invoke()'
      Debug: Exec[install_puppet.ps1](provider=windows): Executing 'C:\Windows\system32\cmd.exe /S /c start /b C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass
      -NoProfile -NoLogo -NonInteractive -Command C:\Users\DCLEVE~1\AppData\Local\Temp\2\install_puppet.ps1 -PuppetPID 288 -Source
      'C:\ProgramData\Puppetlabs\packages\puppet-agent-x64.msi' -Logfile 'C:\Users\DCLEVE~1\AppData\Local\Temp\2\puppet-2020_09_19-15_44-installer.log' -InstallDir ''
      -PuppetMaster 'laxprdcm.csodmgmt.corp' -PuppetStartType 'Automatic' -InstallArgs 'REINSTALLMODE="""amus"""' -UseLockedFilesWorkaround
      '
      Debug: Executing: 'C:\Windows\system32\cmd.exe /S /c start /b C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -NoLogo
      -NonInteractive -Command C:\Users\DCLEVE~1\AppData\Local\Temp\2\install_puppet.ps1 -PuppetPID 288 -Source 'C:\ProgramData\Puppetlabs\packages\puppet
      -agent-x64.msi' -Logfile 'C:\Users\DCLEVE~1\AppData\Local\Temp\2\puppet-2020_09_19-15_44-installer.log' -InstallDir '' -PuppetMaster 'laxprdcm.csodmgmt.
      corp' -PuppetStartType 'Automatic' -InstallArgs 'REINSTALLMODE="""amus"""' -UseLockedFilesWorkaround '
      Notice: /Stage[main]/Puppet_agent::Install::Windows/Exec[install_puppet.ps1]/returns: executed successfully (corrective)
      Debug: /Stage[main]/Puppet_agent::Install::Windows/Exec[install_puppet.ps1]: The container Class[Puppet_agent::Install::Windows] will propagate my refresh event
      Debug: Exec[fix inheritable SYSTEM perms](provider=windows): Executing check 'C:\Windows\system32\cmd.exe /c C:\Windows\system32\icacls.exe "C:/ProgramData/PuppetLabs/puppet/cache/client_data" | findstr "SYSTEM:(OI)(CI)(F)"
      '
      Debug: Executing: 'C:\Windows\system32\cmd.exe /c C:\Windows\system32\icacls.exe "C:/ProgramData/PuppetLabs/puppet/cache/client_data" | findstr "SYSTEM:(OI)(CI)(F)"'
      Debug: /Stage[main]/Puppet_agent::Install::Windows/Exec[fix inheritable SYSTEM perms]/unless: C:/ProgramData/PuppetLabs/puppet/cache/client_data NT AUTHORITY\SYSTEM:(OI)(CI)(F)
      Debug: /Stage[main]/Puppet_agent::Install::Windows/Exec[fix inheritable SYSTEM perms]: 'C:\Windows\system32\icacls.exe "C:/ProgramData/PuppetLabs/puppet/cache/client_data" /grant "SYSTEM:(OI)(CI)(F)"' won't be executed beca
      use of failed check 'unless'
      Debug: Class[Puppet_agent::Install::Windows]: The container Stage[main] will propagate my refresh event
      Debug: Class[Puppet_agent::Install::Windows]: The container Class[Puppet_agent::Install] will propagate my refresh event
      Debug: Class[Puppet_agent::Install]: The container Stage[main] will propagate my refresh event
      Debug: Class[Puppet_agent::Install]: The container Class[Puppet_agent] will propagate my refresh event
      Debug: Class[Puppet_agent]: The container Stage[main] will propagate my refresh event
      Debug: /Stage[main]/Profile::Windows::Puppet::Agent::Init/Ini_setting[rm directory environment main]: Nothing to manage: no ensure and the resource doesn't exist
      Debug: /Stage[main]/Profile::Windows::Puppet::Agent::Init/Ini_setting[rm certname agent]: Nothing to manage: no ensure and the resource doesn't exist
      Debug: Service[puppet](provider=windows): Service puppet is SERVICE_RUNNING
      Debug: Service[puppet](provider=windows): Service puppet start type is SERVICE_AUTO_START
      Debug: Service[pxp-agent](provider=windows): Service pxp-agent is SERVICE_RUNNING
      Debug: Service[pxp-agent](provider=windows): Service pxp-agent start type is SERVICE_AUTO_START
      Debug: /Stage[main]/Puppet_enterprise::Mcollective::Purge::Agent/File[C:\ProgramData/PuppetLabs/mcollective/etc]: Nothing to manage: no ensure and the resource doesn't exist
      Debug: /Stage[main]/Puppet_enterprise::Mcollective::Purge::Agent/File[C:\ProgramData/PuppetLabs/mcollective/plugins]: Nothing to manage: no ensure and the resource doesn't exist
      Debug: Service[mcollective](provider=windows): Service mcollective is SERVICE_STOPPED
      Debug: Service[mcollective](provider=windows): Service mcollective start type is SERVICE_DISABLED
      Debug: /Stage[main]/Puppet_enterprise::Mcollective::Purge::Agent/Scheduled_task[pe-mcollective-metadata]: Nothing to manage: no ensure and the resource doesn't exist
      Debug: Finishing transaction 99131920
      Debug: Storing state
      Debug: Pruned old state cache entries in 0.00 seconds 

       

      This is in my manifest:

      # Include module to keep puppet agent in sync with master. Repo
      # is managed by PE which means the package is taken from PE.
      class {'::puppet_agent':
      package_version => $puppet_agent_version,
      is_pe => true,
      msi_move_locked_files => true,
      }  

       

      ScriptHalted Error:

      Error: Failed previous installation with: ScriptHalted
      Error: /Stage[main]/Puppet_agent::Install::Windows/Puppet_agent_upgrade_error[puppet_agent_upgrade_failure.log]/ensure_notexist: change from false to true failed: Failed previous installation with: ScriptHaltedWarning: /Stage[main]/Puppet_agent::Install::Windows/Exec[install_puppet.ps1]: Skipping because of failed dependencies
      Warning: /Stage[main]/Puppet_agent::Install::Windows/Exec[fix inheritable SYSTEM perms]: Skipping because of failed dependencies  

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ciprian.badescu Ciprian Badescu
              Reporter:
              selvakumar.subburaj Selvakumar Azhagarsami
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support