Supervisor shell reference
The shell is the part of a supervisor that Yukta enforces: it holds the common settings, the assignments, the parents and the limits around an engine. The rules an engine follows are in Supervisor contract.Supervisor object
Body ofPUT /api/supervisors/{id}, and the arguments of save_supervisor.
id
- Type: string
- Default: generated when missing on create
- Required: no
- Description: Identifier of the supervisor.
type
- Type: string
- Default: none
- Required: yes
- Description: The engine:
rules,http,workfloworprocess.
description
- Type: string
- Default: none
- Required: no
- Description: What the supervisor is for.
settings
- Type: object
- Default:
{} - Required: depends on the engine
- Description: The engine’s own settings plus the common settings. Unknown keys are refused. A secret value of
***keeps the stored secret.
dryRun
- Type: boolean
- Default:
false - Required: no
- Description: Records the supervisor’s commands without applying them.
yukta.supervisor.dry-runsets it for every supervisor.
parents
- Type: list of supervisor ids
- Default: none
- Required: no
- Description: The supervisors it reports to, in the order they are asked. Each must exist; no cycle; not itself; a chain is at most 4 supervisors long.
delegation
- Type: object keyed by kind (
APPROVAL,INPUT,CONSULT), each{mode, timeoutSeconds} - Default:
modeORDERED,timeoutSeconds30 - Required: no
- Description: How parents are asked for each kind of delegation.
modeisORDERED,ALLorANY; a refusal from any parent asked is final in every mode.
Common settings
Keys insettings that the server reads for every engine type.
allowedCommands
- Type: list of command names
- Default: the engine’s default: every command for
rules,httpandprocess; none forworkflow - Required: no
- Description: Command types the supervisor may send. Names are those under Command names.
operatorAccess
- Type: list of command names
- Default: none
- Required: no
- Description: Command types that people may send through it; the engine reviews each. A command not listed is refused with
409 CONTROLLED_BY_SUPERVISOR.
initiative
- Type: list of command names
- Default: none
- Required: no
- Description: Command types it may send with no triggering signal (a timer or its own initiative). Each such command also needs a
reason.
maxInitiativePerMinute
- Type: integer, at least 1
- Default:
10 - Required: no
- Description: Most commands without a triggering signal per minute.
canAnswer
- Type: boolean
- Default:
false - Required: no
- Description: Whether it may answer input requests.
maxRisk
- Type:
LOW,MEDIUMorHIGH - Default:
LOW - Required: no
- Description: The highest risk of an input request it may answer. A
HIGHrequest is for people only.
observeInternal
- Type: boolean
- Default:
false - Required: no
- Description: Whether it sees events of internal sessions that its scope names.
Command names
PauseWorkflowCommand, ResumeWorkflowCommand, StopWorkflowCommand, RestartCommand, RestartFromNodeCommand, StartWorkflowCommand, RecoverCommand, SetPriorityCommand, PauseNodeCommand, ResumeNodeCommand, StopNodeCommand, SkipNodeCommand, EnableStepModeCommand, DisableStepModeCommand, StepNodeCommand, SetBreakpointCommand, AnswerInputCommand, EscalateInputCommand, SetLimitsCommand, DrainCommand.
Assignments
An assignment says what a supervisor owns. Body ofPUT /api/supervisors/{id}/assignments is a list of these.
target
- Type: string
- Required: yes
- Description: What is owned; the forms are in the table below.
enabled
- Type: boolean
- Default:
true - Required: no
- Description: Whether the assignment runs.
locked
- Type: boolean
- Default:
false - Required: no
- Description: Only a lock holder may change or remove it; see
yukta.supervisor.lock-holders.
Targets
A node’s group is its
group option, or the part of its id before the first dot.
Sources
Ownership rules
- A unit is a node, the run level of a workflow, or the server. No unit may belong to two assignments.
- The check runs when a supervisor, an assignment or a workflow definition is saved. A violation is
409 OWNERSHIP_CONFLICTnaming the other supervisor and the units. - A
workflowassignment forbids any other assignment on that workflow. Asessionassignment forbids any assignment inside the session. - Two selectors that match no node yet overlap if one prefix begins with the other.
- A node with no owner is carried by the default supervisor, while
yukta.supervisor.default.enabledistrue. - A locked assignment changes only by a lock holder, and removing it needs
unlock. - A supervisor can be deleted only when it owns nothing, no definition names it and no supervisor reports to it.
Errors
The CLI exits with code
6 for the last two refusals and for CONTROLLED_BY_SUPERVISOR.
Server properties
See Configuration reference for every property.