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

[puppet_agent] Agent Upgrade - installer should stop Puppet / MCO prior to initiating uninstall for 3.x agents


    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: puppet_agent 1.2.0
    • Fix Version/s: None
    • Component/s: puppet_agent
    • Labels:
    • Environment:


    • Template:
    • Team:
      Platform OS


      In PUP-2987 (which shipped with Puppet open source 3.7.0), we addressed an issue with service hangs on Windows that could prevent Puppet from properly uninstalling.

      Since the agent upgrade module supports installing from these older PE versions which may have this bug in the service code, to properly upgrade an agent, it may be necessary to forcefully terminate the processes associated with the puppet, pe-puppet, mcollective or pe-mcollective services.

      For users who encounter this issue, it's a major pain, because it requires manual intervention to remediate. Such manual intervention does not scale.

      The Azure extension handler employs a work-around prior to uninstall, it tries to gracefully stop services, and then forcefully kills them if their PIDs are still running after a certain timeout period.

      Based on how the upgrade process works, such a workaround would have to be put in the batch file at https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/master/templates/install_puppet.bat.erb

      After waiting on the Puppet run to exit, the next steps would be to:

      • retrieve PIDs for running service processes
      • ask all services to shut-down
      • requery services in a similar timeout loop as the one used for waiting on the parent agent run
      • terminate processes by ID that are still running, logging any such instances to the event log


          Issue Links




                • Assignee:
                  ethan Ethan Brown
                • Votes:
                  0 Vote for this issue
                  6 Start watching this issue


                  • Created: