Skip to contents

Stops + removes the container at index idx if it exists, then starts a fresh replacement with identical config (image, scratch_root bind-mount, user, cpu_limit, mem_limit) using a new auto-generated container name. The pool object's $names[idx] is updated to point at the new container.

Usage

landis_pool_restart_one(pool, idx)

Arguments

pool

A landis_pool object from landis_pool_start().

idx

Integer. 1-based index of the container to replace.

Value

The pool (invisibly), with $names[idx] updated to the new container name.

Details

Intended for use by landis_pool_exec()'s retries mechanism, but also safe to call directly when a calibration driver detects a container is wedged or has been OOM-killed.