puppet.stop

puppet.stop

Stops the current Puppet run on a node. Post-run hooks do not run after a stopped run.

puppet.stop stops only runs that were started through RVC with puppet.run. It does not stop runs started another way, such as scheduled runs started by Puppet Launcher or a puppet agent -t run started from a shell, even though puppet.status reports those runs as running. When there is no run started through RVC to stop, the response is There is no puppet running. and the CLI exits with code 1.

In RVC 3.13.0, a stop issued while a run is still in its random wait does not prevent the run. Puppet starts when the wait ends. This is fixed in RVC 3.13.1.

JSON-RPC Request

{"jsonrpc":"2.0","id":1,"method":"puppet.stop"}

JSON-RPC Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32048,
        "message": "Puppet run process <pid> stopped."
    }
}

RVC CLI Example

rvc puppet stop

Response

Puppet run process 28869 stopped.

The stopped run ends with the following output in the terminal where rvc puppet run was started:

Notice: Caught INT; exiting
Puppet forcefully stopped after half a minute. Output saved to /var/log/puppetlabs/last_execution.log.

Output when no run started through RVC is in progress:

There is no puppet running.