How the service directory's commands refuse

How the service directory's commands refuse

stado service directory bind, connect, beside, publish, profiles, consumer add and consumer remove refuse with the causes of stado.services.directory (stado errors show stado.services.directory prints each with its fix), beside the registry's read and write causes. The directory and service readers every directory command shares raise its first four causes too, and stado service ensure meets the port causes when it records the port a host hands out:

cause when exit
directory-absent the registry carries no service_directory object 1
services-malformed service_directory.services is absent or not an object 1
service-unknown the directory declares no service of that name; names those it does 1
machine-unregistered no registry target carries this machine's hostname 1
entry-malformed the service entry, its consumers or one consumer is not an object 1
generation-unadvanced the directory's generation cannot advance; nothing is written 1
consumer-empty consumer add with an empty CONSUMER 2
target-unregistered --target names no registered target 1
adapters-undeclared --target declares no resolver adapters 1
binding-ambiguous --target declares the pair's adapter more than once 1
binding-unaddressed --target declares the pair's adapter without an address 1
port-held the port the host handed out is one another adapter already declares 1
consumers-undeclared consumer remove from a service that declares no consumers 1
consumer-unknown consumer remove of a consumer the service does not declare 1
host-port-unanswered the host hands out no free loopback port 69
port-recorded the port the host handed out is recorded for another service there 1
unplaced bind of a service the directory places on no host 1
placed-elsewhere bind asked for a host the service is not placed on 1
placed-unregistered the service is placed on a host the registry does not carry 1
placed-unroutable the host it is placed on declares no SSH destination a resolver answers; the refusal names its destinations on Stado's network, which only Stado's node resolves, and stado registry host path set <host> <path> --ssh <user@address>. A peer in the same state is not dropped from encrypted_peers in silence: bind lists it under omitted_peers (host, on_stado_network_only, why), and as omitted_peer=<why> lines in text 1
scheme-unreadable connect of a service with no scheme and no endpoint URL to read one from 1
port-undeclared connect of a service placed without a port for its host 1
caller-route-undeclared the asking host declares no caller endpoint or adapter for the consumer 1
resolver-declaration-invalid the asking host's service_resolver does not read 1
adapter-undeclared --consumer names a consumer the asking host has no adapter for 1
consumer-unnamed the asking host declares several adapters and no --consumer is named 2
service-silent the service did not answer where the directory routes this host 69
beside-request-invalid beside with a service and neither or both of --url/--withdraw, or a flag without a service; judged before the record is read 2
beside-url-invalid beside --url that is no loopback http(s) URL with its port 2
beside-undeclared beside --withdraw of a service this host does not declare 1
beside-unreadable ~/.stado/beside.json cannot be read or is out of shape 1
beside-unwritten ~/.stado/beside.json cannot be written 1
publish-prune-scoped publish --prune --service 2
markers-undeclarable the directory does not read as one that declares markers 1
forwards-unlocated no home names ~/.stado/forwards 1
publish-service-undeclared publish --service of a service the directory routes nowhere here 1
markers-unremoved publish --prune could not remove some markers; each is listed 69
profiles-absent profiles on a registry without placement profiles 1
profile-unnamed a placement profile declares no name 1

A connect refusal keeps its route_state and generation in the --json details. tests/service_directory/causes.rs provokes thirteen of them through the real binary; a refused change leaves the stored registry, the beside record and the forward markers as they were.

Source: this website