Uploaded image for project: 'Puppet Communications Protocol'
  1. Puppet Communications Protocol
  2. PCP-869

Implement run_script for pxp-agent

    XMLWordPrintable

Details

    • New Feature
    • Hide
      Previously, running a command over PCP via pxp-agent required wrapping the command in a temporary task wrapper via bolt_shim, because pxp-agent was not able to respond to any other types of PCP requests for bolt actions (like "command run", "upload file", or "script run").

      These changes allow pxp-agents to respond to requests to execute a "script run" action over PCP without formatting them as tasks.
      Show
      Previously, running a command over PCP via pxp-agent required wrapping the command in a temporary task wrapper via bolt_shim, because pxp-agent was not able to respond to any other types of PCP requests for bolt actions (like "command run", "upload file", or "script run"). These changes allow pxp-agents to respond to requests to execute a "script run" action over PCP without formatting them as tasks.
    • Needs Assessment

    Description

      Users can currently run_task over pxp, but for run_script, they must first install the bolt_shim module, which converts any run_script actions to tasks so that pxp-agent can handle them.

      Update pxp-agent so that it can run_script natively, the way it can already run_task.

      Use methods from upload_file and run_command to implement run_script. run_script should be a single atomic operation from a protocol perspective.

      run_script should look very similar to run_task. run_script should:

      • Download the file to the cache dir
      • Run the script from the cache dir with any arguments passed through the protocol.
      • Replicate the windows specific "interpreter finding" logic
      • Ensure run_script is "Purgeable" in the same way that run_task is
      • the schema should look similar to run task with an additional array of "arguments" for the script to be run

      Attachments

        Issue Links

          Activity

            People

              sean.mcdonald Sean McDonald
              casey.williams Casey Williams
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support