diff --git a/source/_configure/rte/runner/index.md b/source/_configure/rte/runner/index.md index 994af91b..7352f5bb 100644 --- a/source/_configure/rte/runner/index.md +++ b/source/_configure/rte/runner/index.md @@ -58,6 +58,20 @@ on where it stopped, and what the controller did not store yet is sent again aft --- +## Pause and resume + +From Runner 7.10.0 a playbook job can be paused and resumed on Docker, Podman and Kubernetes, as on the Node RTE. + +A pause lets the playbook finish the task it runs and holds it before its next one, its process alive, until a resume lets it go on. +The Runner keeps its pauses over a restart, and a playbook whose container a restart lost resumes at its first unfinished task. + +A pause does not reach every job: + +- On Kubernetes, a job started before the Runner's upgrade to 7.10.0 cannot be paused +- A pause that cannot reach a job is logged by the Runner, and the job runs on + +--- + ## Modes and engines Two settings shape a Runner: how it meets the controller, and what runs its jobs' containers. @@ -125,6 +139,7 @@ Both are runners of type RTE to the controller, and a controller may have some o | Modes | `outbound`, `inbound`, and `database` (deprecated) | `outbound` and `inbound` | | Where a playbook runs | In the RTE's own container, as a child process | In a fresh container per job, of `RTE_IMAGE` | | What it needs | python and ansible in its own image | A Docker or Podman socket, or a Role on Kubernetes | +| Pause and resume | Yes | Yes, from 7.10.0, on Docker, Podman and Kubernetes | | Image | `ansibleforms-rte-base`, `-core` or `-full` | `ghcr.io/ansibleforms/ansibleforms-rte-runner` | --- diff --git a/source/_configure/rte/runner/kubernetes.md b/source/_configure/rte/runner/kubernetes.md index 9c53eeae..46714cc5 100644 --- a/source/_configure/rte/runner/kubernetes.md +++ b/source/_configure/rte/runner/kubernetes.md @@ -25,6 +25,9 @@ The Runner makes the job's pod through the Kubernetes API, writes the job on the An init container copies the Runner's binary from its own image (`RTE_RUNNER_IMAGE`, by default the Runner's image of its own version), and the job's container, of `RTE_IMAGE`, runs it. In a pod the Runner picks the `kubernetes` engine without `RTE_ENGINE`. +From Runner 7.10.0 on, a pause or a resume goes on the pod's stdin too, which the pod keeps open; no new permission is needed. +A job started by an earlier Runner closed its pod's stdin, so it cannot be paused after the upgrade: it runs on, the pause logged. + From Runner 7.9.0 on, the jobs' pods meet the restricted Pod Security Standard: they run as uid and gid 1000, as non-root, with the `RuntimeDefault` seccomp profile, no privilege escalation and every capability dropped. A namespace that enforces it takes them. @@ -92,7 +95,7 @@ Without Helm, apply the Role yourself: the Runner's service account needs it on |---|---|---| | `pods` | create, get, list, patch, delete | Make a job's pod, follow it, stop it (its deadline lowered), remove it | | `pods/log` | get | Read the job's lines | -| `pods/attach` | create, get | Write the job on the pod's stdin | +| `pods/attach` | create, get | Write the job, and its pauses and resumes, on the pod's stdin | | `persistentvolumeclaims` | get | Read a claim's access modes, for `RTE_JOB_MOUNTS` (its own pod is read with `pods` get) | [deploy/kubernetes-rbac.yaml](https://github.com/ansibleforms/runner/blob/main/deploy/kubernetes-rbac.yaml) makes the service