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

Windows: non-blocking PXP tasks are terminated when pxp-agent service restarts

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: puppet-agent 1.4.0
    • Fix Version/s: puppet-agent 1.4.0
    • Component/s: Packaging
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      PCP 2016-02-24 (Burn FF)

      Description

      Background:

      • See PCP-207 . pxp-agent needs to be able to make non-blocking calls to run puppet agent, and should be able to later report on the results of that puppet agent run even if the pxp-agent service was restarted during the puppet agent run
      • The bug only occurs for pxp-agent as a service - it does not occur if you keep the pxp-agent service stopped and run pxp-agent.exe as an executable

      Reproduction (of PXP use case):

      • On a Windows 2012R2 vmpooler host, create a puppet environment that will take some time to complete e.g. includes an Exec resource that calls sleep for several minutes. I'm using:

        class sleep {
          case $::osfamily {
            'windows': { exec { 'sleep':
                                command => 'true',
                                unless  => 'sleep 500', #PUP-5806
                                path    => 'C:\\cygwin64\\bin',} }
            default:   { exec { 'sleep': command => '/bin/sleep 500 || /bin/true', } }
          }
        }

      • Trigger a puppet run on the agent using PXP's rpc_non_blocking_request
        • Note that running puppet agent at terminal will not reproduce this issue
        • The options I'm using are --server [server] --onetime --no-daemonize --environment sleep
      • Puppet should now be running but stuck on the sleep exec
      • Restart the pxp-agent service using 'net stop pxp-agent' then 'net start pxp-agent'

      Expected behaviour:

      • Puppet agent (and the sleep process that puppet agent is waiting on) should still be running. The puppet agent and sleep processes will appear to be running on the host until either the sleep times out, or it receives SIGALARM

      Actual behaviour:
      On Redhat6 and Ubuntu 14.04 the expected behaviour occurs.
      Windows 21012R2 with Cygwin, or Redhat 7 (which has a separate ticket RE-6491), stopping the pxp-agent service appears (looking at Task Manager and the Applications section of Event Viewer) to kill puppet agent.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                richard Richard Clamp
                Reporter:
                james.stocks James Stocks
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support