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

puppetlabs-puppet_agent : Msi wrong URL if puppet5

    XMLWordPrintable

    Details

    • Template:
      MODULES Bug Template
    • Team:
      Platform OS
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 1.6.0
      Puppet Version: puppet-agent ** 5.5.0 , puppet server  open source:  5.3.3
      OS Name/Version: Windows 2012 R2

      Hello,

       

      The url used here : https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/manifests/windows/install.pp#L22 , returns a 404 if we want to install puppet5 , because the v5 puppet-agent are inside a puppet5 folder.

      For example:

       

      //   class { 'puppet_agent':
         collection            => 'puppet5',
         package_version       => '5.5.1',
      }

       Creates: C:\Windows\Temp\install_puppet.bat

      // SETset AGENT_PID=%1
      set windowTitle=Puppet Agent Upgrade
      title %windowTitle%set pid=
      for /f "tokens=2" %%a in ('tasklist /v ^| findstr /c:"%windowTitle%"') do set pid=%%a
      set pid_path=%~dp0puppet_agent_upgrade.pidset environment=
      for /f "delims=" %%i in ('puppet config print --section agent environment') do set environment=%%iif exist %pid_path% del %pid_path%
      @echo %pid%> %pid_path%SET /A pid_checks_performed=0:wait_for_pid
      REM Wait 5 seconds
      ping 127.0.0.1 -n 6 > NUL
      wmic path Win32_Process where handle=%AGENT_PID% get handle /format:textvaluelist | findstr /I "Handle=%AGENT_PID%"SET /A pid_checks_performed+=1
      REM Wait for a max of 120 seconds (or 24 iterations) before aborting the upgrade
      IF %errorlevel% == 0 IF %pid_checks_performed% == 24 (
        REM Adding CustomSource allows EventCreate to work properly
        reg add HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Puppet /v CustomSource /t REG_DWORD /d 1 /f
        EVENTCREATE /T ERROR /L APPLICATION /SO Puppet /ID 101 /D "Puppet agent upgrade failed while waiting for Puppet process [ID: %AGENT_PID%] to exit."
        GOTO End
      )IF %errorlevel% == 0 ( GOTO wait_for_pid )REM This *must* occur after Puppet Agent has finished applying its
      REM prior catalog which manages the pxp-agent service state. If not,
      REM the catalog includes the PE module which starts the service and
      REM sets its startup type, which prevents installs from proceeding.
      REM This may fail on agents without pxp-agent, but since this is not
      REM run interactively and the next command sets ERRORLEVEL, it's OK.
      net stop pxp-agent
      REM Same for the Marionette Collective Service and Puppet Agent service
      net stop mcollective
      net stop puppetREM Log the current user token privileges for debugging
      whoami /allstart /wait msiexec.exe /qn /norestart /i "https://downloads.puppetlabs.com/windows/puppet-agent-5.5.1-x64.msi" /l*vx "C:\Windows\TEMP\puppet-2018_06_09-11_08-installer.log" PUPPET_MASTER_SERVER="puppetmaster" PUPPET_AGENT_ENVIRONMENT="%environment%"  PUPPET_AGENT_STARTUP_MODE="Automatic" REINSTALLMODE="amus":Endif exist %pid_path% del %pid_path%ENDLOCAL
      
      

      With the msi log error:

      // === Verbose logging started: 09/06/2018  12:16:15  Build type: SHIP UNICODE 5.00.9600.00  Calling process: C:\Windows\system32\msiexec.exe ===
      MSI (c) (18:A0) [12:16:15:601]: Resetting cached policy values
      MSI (c) (18:A0) [12:16:15:601]: Machine policy value 'Debug' is 0
      MSI (c) (18:A0) [12:16:15:601]: ******* RunEngine:
                 ******* Product: https://downloads.puppetlabs.com/windows/puppet-agent-5.5.1-x64.msi
                 ******* Action: 
                 ******* CommandLine: **********
      MSI (c) (18:A0) [12:16:15:601]: Client-side and UI is none or basic: Running entire install on the server.
      MSI (c) (18:A0) [12:16:15:601]: Grabbed execution mutex.
      MSI (c) (18:A0) [12:16:15:631]: Cloaking enabled.
      MSI (c) (18:A0) [12:16:15:631]: Attempting to enable all disabled privileges before calling Install on Server
      MSI (c) (18:A0) [12:16:15:633]: Incrementing counter to disable shutdown. Counter after increment: 0
      MSI (s) (2C:3C) [12:16:15:639]: Running installation inside multi-package transaction https://downloads.puppetlabs.com/windows/puppet-agent-5.5.1-x64.msi
      MSI (s) (2C:3C) [12:16:15:639]: Grabbed execution mutex.
      MSI (s) (2C:B8) [12:16:15:644]: Resetting cached policy values
      MSI (s) (2C:B8) [12:16:15:644]: Machine policy value 'Debug' is 0
      MSI (s) (2C:B8) [12:16:15:644]: ******* RunEngine:
                 ******* Product: https://downloads.puppetlabs.com/windows/puppet-agent-5.5.1-x64.msi
                 ******* Action: 
                 ******* CommandLine: **********
      MSI (s) (2C:B8) [12:16:15:644]: Using WinHttp to perform URL download
      MSI (s) (2C:B8) [12:16:15:644]: File path is a URL. Downloading file. . .
      MSI (s) (2C:B8) [12:16:15:649]: Msi WinHttp: Performing auto proxy detection
      MSI (s) (2C:B8) [12:16:15:650]: MSI WinHttp: Proxy Settings Proxy: (none) | Bypass: (none) | AccessType: 0
      MSI (s) (2C:B8) [12:16:15:985]: StatusCode is:[404]
      MSI (s) (2C:B8) [12:16:15:985]: Download of URL resource https://downloads.puppetlabs.com/windows/puppet-agent-5.5.1-x64.msi failed with last error 2
      MSI (s) (2C:B8) [12:16:15:986]: MainEngineThread is returning 2
      MSI (s) (2C:3C) [12:16:15:988]: User policy value 'DisableRollback' is 0
      MSI (s) (2C:3C) [12:16:15:988]: Machine policy value 'DisableRollback' is 0
      MSI (s) (2C:3C) [12:16:15:988]: Incrementing counter to disable shutdown. Counter after increment: 0
      MSI (s) (2C:3C) [12:16:15:988]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
      MSI (s) (2C:3C) [12:16:15:988]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
      MSI (s) (2C:3C) [12:16:15:989]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
      MSI (c) (18:A0) [12:16:15:991]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
      MSI (c) (18:A0) [12:16:15:991]: MainEngineThread is returning 2
      === Verbose logging stopped: 09/06/2018  12:16:15 ===
      

       

       

      Desired Behavior:

      The good url base should be: https://downloads.puppetlabs.com/windows/puppet5/

      Actual Behavior:

      The puppet upgrade failed and the services mcollective, puppet , pxp-puppet are stopped. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Luds Ludovic Jerome
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support