A step ask put while the assigner was down waited for nobody: the plain subscription heard only what came while it ran. The assigner now pulls every waiting ask from the seat's one worker, takes it once by its id in its state taken (for ask-taken-bound), says ask-taken at the pull, sends in-progress while the step runs and acknowledges once the step's end is said. It serves the seat's act drop: a running ask is cancelled, one not yet pulled is kept in taken as dropped.<ask>; either ends its step could not run naming the drop. assigner_asks reads what waits on the queue (stdio.QueueWaiting) and what is taken or dropped; assigner_ask_drop ends one ask, written in the hand-act log. The manifest declares taken, drop, the two tools, ask-taken-bound and the kept-call pace as runtime settings. Builds: design 47 H2 §777, §775, §778, §820; H-A-381, H-A-401, H-A-404, H-A-410
411 lines
14 KiB
JSON
411 lines
14 KiB
JSON
{
|
|
"module": "mesh-delivery-assigner",
|
|
"version": "0.3",
|
|
"slug": "assigner",
|
|
"runs-as": "mesh-delivery-assigner",
|
|
"claims": [
|
|
{
|
|
"name": "mesh-module-assigner",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"assignments",
|
|
"proposals",
|
|
"propose",
|
|
"withdraw",
|
|
"again",
|
|
"placement"
|
|
]
|
|
},
|
|
{
|
|
"name": "mesh-wants",
|
|
"scope": "mesh",
|
|
"serves": [
|
|
"upgrade",
|
|
"bus",
|
|
"revision",
|
|
"entry",
|
|
"difference",
|
|
"input",
|
|
"compositions",
|
|
"compositions-drop",
|
|
"drop"
|
|
]
|
|
}
|
|
],
|
|
"reads": [
|
|
"mesh-grants.grants",
|
|
"mesh-host.composed",
|
|
"node-engine.have"
|
|
],
|
|
"uses": [
|
|
"operator-channel"
|
|
],
|
|
"consumes": [
|
|
"mesh-conditions.findings-asked",
|
|
"mesh-conditions.condition-raised",
|
|
"mesh-conditions.condition-changed",
|
|
"mesh-conditions.condition-cleared",
|
|
"mesh-catalog.catalog-revision",
|
|
"mesh-catalog.registration-changed",
|
|
"mesh-delivery.source-moved",
|
|
"mesh-catalog.version-released",
|
|
"mesh-watchdogs.machine-away",
|
|
"mesh-watchdogs.machine-back",
|
|
"mesh-catalog.seat-definition-changed",
|
|
"mesh-catalog.seat-definition-removed",
|
|
"mesh-delivery-builder.build.ended.**",
|
|
"mesh-delivery-teller.ask-ended",
|
|
"mesh-delivery-teller.views.answers",
|
|
"mesh-pipeline-runner.pipeline-ended",
|
|
"node-build-go.step-ended",
|
|
"node-build-go.ask-taken",
|
|
"node-build-go.step-progress",
|
|
"node-engine.manifest-reads-changed",
|
|
"node-engine.running"
|
|
],
|
|
"invokes": [
|
|
"mesh-delivery-indexer.manifests",
|
|
"mesh-delivery-indexer.modules",
|
|
"mesh-delivery-teller.teller_read_answers",
|
|
"seat:mesh-catalog.entry",
|
|
"seat:mesh-catalog.registrations",
|
|
{"verb": "seat:mesh-catalog.revision", "fields": ["none-yet"]},
|
|
"seat:mesh-catalog.seat-definitions",
|
|
"seat:mesh-conditions.conditions",
|
|
"seat:mesh-delivery.source",
|
|
"seat:mesh-hand-acts.hand-act",
|
|
"seat:mesh-hand-acts.hand-acts",
|
|
"seat:mesh-hand-acts.warranted",
|
|
"seat:node-backup.backed-up",
|
|
"seat:node-backup.now",
|
|
"seat:node-build-go.output",
|
|
"seat:node-build-go.drop",
|
|
"seat:node-engine.compose-candidate",
|
|
"seat:operator-channel.asks",
|
|
"seat:node-build-go.accept.check"
|
|
],
|
|
"streams": [
|
|
{
|
|
"name": "mesh-delivery-assigner-findings",
|
|
"events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"],
|
|
"max-age-days": 7,
|
|
"max-mib": 16
|
|
}
|
|
],
|
|
"emits": [
|
|
"assignments-copied",
|
|
"put",
|
|
"views.asks",
|
|
"views.copies",
|
|
"views.differences",
|
|
"views.findings",
|
|
"views.assignments",
|
|
"views.seat-holders",
|
|
"views.wants"
|
|
],
|
|
"tools": [
|
|
"assigner_put",
|
|
"assigner_release",
|
|
"assigner_puts",
|
|
"assigner_waits",
|
|
"assigner_inputs",
|
|
"assigner_inputs_drop",
|
|
"assigner_compositions",
|
|
"assigner_compositions_drop",
|
|
"assignments",
|
|
"seat-holders",
|
|
"wants",
|
|
"asks",
|
|
"assigner_read_assignments",
|
|
"assigner_read_seat_holders",
|
|
"assigner_read_wants",
|
|
"assigner_read_findings",
|
|
"assigner_read_differences",
|
|
"assigner_read_copies",
|
|
"assigner_first_views",
|
|
"assigner_first_view_again",
|
|
"assigner_engine_reads",
|
|
"assigner_seat_list",
|
|
"assigner_seat_list_again",
|
|
"assigner_ask_again",
|
|
"assigner_written",
|
|
"assigner_why",
|
|
"assigner_want_drop",
|
|
"assigner_asks",
|
|
"assigner_ask_drop"
|
|
],
|
|
"state": [
|
|
{ "name": "assignments", "history": 64 },
|
|
{ "name": "placement", "history": 64 },
|
|
{ "name": "copies", "history": 1 },
|
|
{ "name": "proposals", "history": 5 },
|
|
{ "name": "candidates", "history": 5 },
|
|
{ "name": "pulses", "key-ttl": true },
|
|
{ "name": "asks", "history": 5 },
|
|
{ "name": "differences", "history": 64 },
|
|
{ "name": "puts", "history": 20 },
|
|
{ "name": "wants", "history": 20 },
|
|
{ "name": "findings", "history": 5 },
|
|
{ "name": "policies", "history": 20 },
|
|
{ "name": "seat-holders", "history": 5 },
|
|
{ "name": "view-marks", "history": 1 },
|
|
{ "name": "first-views", "history": 1 },
|
|
{ "name": "engine-reads", "history": 1 },
|
|
{ "name": "written", "history": 5 },
|
|
{ "name": "waits", "history": 5 },
|
|
{ "name": "put-waits", "history": 1 },
|
|
{ "name": "inputs", "history": 1, "max-mib": 64 },
|
|
{ "name": "composition-runs", "history": 1, "key-ttl": true, "max-mib": 64 },
|
|
{ "name": "taken", "history": 1, "key-ttl": true, "max-mib": 8 }
|
|
],
|
|
"config": {
|
|
"outside-wait-minutes": {
|
|
"type": "number",
|
|
"description": "minutes a moved module's failing check waits on an outside cause before the operator is asked to go on or count it as failed (design 47 G section 706); a bound a whole test sets in seconds.",
|
|
"minimum": 1,
|
|
"maximum": 10080,
|
|
"trusted": false,
|
|
"default": 30
|
|
},
|
|
"outside-settle-seconds": {
|
|
"type": "number",
|
|
"description": "seconds the assigner holds its judgement of a failing check when no outside cause is open yet, since the node-engine states the failing check and the network in one report while the condition rises only after the watchman's two looks and the keeper's take-in (design 47 G section 706).",
|
|
"minimum": 1,
|
|
"maximum": 3600,
|
|
"trusted": false,
|
|
"default": 90
|
|
},
|
|
"ask-operator-for": {
|
|
"type": "string",
|
|
"description": "the change kinds of a proposal the assigner asks the operator before it writes it, separated by commas: place, take-off, pin, unpin, hold, unhold, decide, config, add-node, remove-node, and stops for a verdict whose answers say a node would stop running a module (design 47 G A-425, A-425a). A proposal none of whose changes is of a kind named is applied at once when its verdict passes, said in the log and by assignments-changed. The default is take-off,remove-node,stops; empty asks for nothing.",
|
|
"trusted": false,
|
|
"default": "take-off,remove-node,stops"
|
|
},
|
|
"tier-bound": {
|
|
"type": "number",
|
|
"description": "minutes each tier of a pipeline's movers has to run on every present placing machine before the assigner writes the next tier's wants; a tier that does not run within it ends the delivery with the finding tier-late and writes no later tier (design 47 H section 751).",
|
|
"minimum": 1,
|
|
"maximum": 10080,
|
|
"trusted": false,
|
|
"default": 30
|
|
},
|
|
"entry-asks": {
|
|
"type": "number",
|
|
"description": "how often the assigner asks a catalog entry again, on each catalog-revision and when its link to the bus opens again, after its ask failed to reach the holder of the seat mesh-catalog; one more failure leaves it unanswered, with the finding entry-unanswered (design 47 H, H-A-60).",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"trusted": false,
|
|
"default": 5
|
|
},
|
|
"composition-runs-cap-mib": {
|
|
"type": "number",
|
|
"description": "the cap of the state composition-runs in MiB, the process refusing a new composition run at it with its steps ending could not run naming the fill (design 47 G section 719, A-469d); its maximum is the manifest's max-mib.",
|
|
"minimum": 1,
|
|
"maximum": 64,
|
|
"trusted": false,
|
|
"default": 16
|
|
},
|
|
"composition-runs-kept": {
|
|
"type": "string",
|
|
"description": "how long a composition run's key is kept after it ended, a Go duration such as 24h (design 47 G section 719, A-469x).",
|
|
"trusted": false,
|
|
"default": "24h"
|
|
},
|
|
"composition-step-bound": {
|
|
"type": "string",
|
|
"description": "how long a taken composition run's ask may go without saying its progress before the run ends could not run, a Go duration such as 30m; written again at each step-progress (design 47 G section 720, A-469x).",
|
|
"trusted": false,
|
|
"default": "30m"
|
|
},
|
|
"run-untaken-bound": {
|
|
"type": "string",
|
|
"description": "how long a composition run's ask may wait for a build node to take it before the run ends could not run, a Go duration such as 24h (design 47 G section 720, A-466s, A-469x).",
|
|
"trusted": false,
|
|
"default": "24h"
|
|
},
|
|
"blame-tries": {
|
|
"type": "number",
|
|
"description": "the most compositions a machine's composer makes to find the modules it blames, carried in the run's request as blame_tries (design 47 G section 721, A-466r).",
|
|
"minimum": 1,
|
|
"maximum": 1000,
|
|
"trusted": false,
|
|
"default": 20
|
|
},
|
|
"ask-taken-bound": {
|
|
"type": "string",
|
|
"description": "how long the assigner keeps the id of an ask it took from the seat mesh-wants' work queue, so a repeat of it is taken once, and the drop of an ask not pulled yet, a Go duration such as 10m (design 47 H2 §775, §778; H-A-381 (2), H-A-404).",
|
|
"trusted": false,
|
|
"default": "10m",
|
|
"runtime": true
|
|
},
|
|
"kept-call-pace-first": {
|
|
"type": "string",
|
|
"description": "the first wait before a kept call met by a transport fault is made again, doubled per call up to kept-call-pace-max, a Go duration (design 47 H2 §775).",
|
|
"trusted": false,
|
|
"default": "1s",
|
|
"runtime": true
|
|
},
|
|
"kept-call-pace-max": {
|
|
"type": "string",
|
|
"description": "the most a kept call's wait between calls grows to, a Go duration (design 47 H2 §775).",
|
|
"trusted": false,
|
|
"default": "30s",
|
|
"runtime": true
|
|
}
|
|
},
|
|
"objects": [
|
|
{ "name": "assignment-revisions", "max-mib": 512, "form": 1 }
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:state}/broker"
|
|
},
|
|
"secrets-owner": "mesh-delivery-assigner",
|
|
"resources": [
|
|
{
|
|
"id": "account",
|
|
"type": "user",
|
|
"name": "mesh-delivery-assigner",
|
|
"shell": "/usr/bin/nologin",
|
|
"home": "/var/lib/mesh-delivery-assigner"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "mesh-delivery-assigner",
|
|
"place": ".",
|
|
"unknown": "program"
|
|
},
|
|
{
|
|
"id": "outside-wait",
|
|
"type": "file",
|
|
"path": "${dir:state}/outside-wait-minutes",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:outside-wait-minutes}"
|
|
},
|
|
{
|
|
"id": "outside-settle",
|
|
"type": "file",
|
|
"path": "${dir:state}/outside-settle-seconds",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:outside-settle-seconds}"
|
|
},
|
|
{
|
|
"id": "ask-operator-for",
|
|
"type": "file",
|
|
"path": "${dir:state}/ask-operator-for",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:ask-operator-for}"
|
|
},
|
|
{
|
|
"id": "tier-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/tier-bound",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:tier-bound}"
|
|
},
|
|
{
|
|
"id": "entry-asks",
|
|
"type": "file",
|
|
"path": "${dir:state}/entry-asks",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:entry-asks}"
|
|
},
|
|
{
|
|
"id": "composition-runs-cap-mib",
|
|
"type": "file",
|
|
"path": "${dir:state}/composition-runs-cap-mib",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:composition-runs-cap-mib}"
|
|
},
|
|
{
|
|
"id": "composition-runs-kept",
|
|
"type": "file",
|
|
"path": "${dir:state}/composition-runs-kept",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:composition-runs-kept}"
|
|
},
|
|
{
|
|
"id": "composition-step-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/composition-step-bound",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:composition-step-bound}"
|
|
},
|
|
{
|
|
"id": "run-untaken-bound",
|
|
"type": "file",
|
|
"path": "${dir:state}/run-untaken-bound",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:run-untaken-bound}"
|
|
},
|
|
{
|
|
"id": "blame-tries",
|
|
"type": "file",
|
|
"path": "${dir:state}/blame-tries",
|
|
"owner": "mesh-delivery-assigner",
|
|
"mode": "0600",
|
|
"content": "${config:blame-tries}"
|
|
},
|
|
{
|
|
"id": "assigner",
|
|
"type": "process",
|
|
"name": "mesh-delivery-assigner",
|
|
"artifact": "program",
|
|
"run": [
|
|
"./mesh-delivery-assigner"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "${dir:state}/broker",
|
|
"MESH_ASSIGNER_OUTSIDE_WAIT_FILE": "${dir:state}/outside-wait-minutes",
|
|
"MESH_ASSIGNER_OUTSIDE_SETTLE_FILE": "${dir:state}/outside-settle-seconds",
|
|
"MESH_ASSIGNER_ASK_OPERATOR_FOR_FILE": "${dir:state}/ask-operator-for",
|
|
"MESH_ASSIGNER_TIER_BOUND_FILE": "${dir:state}/tier-bound",
|
|
"MESH_ASSIGNER_ENTRY_ASKS_FILE": "${dir:state}/entry-asks",
|
|
"MESH_ASSIGNER_COMPOSITION_RUNS_CAP_MIB_FILE": "${dir:state}/composition-runs-cap-mib",
|
|
"MESH_ASSIGNER_COMPOSITION_RUNS_KEPT_FILE": "${dir:state}/composition-runs-kept",
|
|
"MESH_ASSIGNER_COMPOSITION_STEP_BOUND_FILE": "${dir:state}/composition-step-bound",
|
|
"MESH_ASSIGNER_RUN_UNTAKEN_BOUND_FILE": "${dir:state}/run-untaken-bound",
|
|
"MESH_ASSIGNER_BLAME_TRIES_FILE": "${dir:state}/blame-tries"
|
|
},
|
|
"user": "mesh-delivery-assigner",
|
|
"health": {
|
|
"kind": "unit"
|
|
}
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "program",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/mesh-delivery-assigner",
|
|
"binary": "mesh-delivery-assigner",
|
|
"loads": [
|
|
"mesh-delivery-assigner"
|
|
]
|
|
},
|
|
{
|
|
"name": "asks",
|
|
"kind": "package",
|
|
"language": "go",
|
|
"paths": [
|
|
"asks"
|
|
],
|
|
"series": "0.3"
|
|
}
|
|
]
|
|
}
|
|
}
|