StaticfailingTrue after a reconcile has failed, until one succeeds. The error code is logged on the transition, not on every retry.
StaticINTERVAL_How often the leader reconciles, in milliseconds. The groups' TCP health check is 10 seconds and unhealthy after 3, so a stale address is removed inside that window.
StaticJOB_The scheduler's id. Dot-separated words, which is the id shape
cluster/scheduler.ts accepts.
StaticMETADATA_The most metadata that is read. A task document is a few kilobytes.
StaticMETADATA_How long the task-metadata read waits. The address is link-local.
StaticSTOP_How long a stop waits for its own address to be deregistered before the rest of shutdown continues. The deregistration delay on the group is 30 seconds and does not need this process to stay up.
StaticstoppingSet by beginStop(). An in-flight reconcile does not register after this, and the job's off() answers so the scheduler does not start another.
StaticbeginThe shutdown flag. Called before the scheduler stops, so a reconcile
already inside reconcileGroups() sees it before the next mutating call.
StaticchangeRegisters or deregisters. No availability zone: an IP target in this VPC does not take one, and sending one would be a different target.
StaticclientsThe two clients, constructed with the default credential chain.
AWS_REGION is already set on the task (environment/ecs.tf). Nothing
is called until a reconcile sends.
StaticclusterThe cluster name from a task's Cluster field: the ARN's last segment, or the field itself when it is already a name.
StaticdescribeThe private addresses of arns, a hundred at a time (DescribeTasks'
limit). A task that is not a node's (isNodeTask()) or has no IPv4
address is skipped.
StaticensureRegisters the job, once. Every process calls this (protocol_stack.ts);
registering starts nothing. A narrow test with no scheduler is ignored.
StaticgroupThe current members of one group. Health is ignored by the reconcile; it is returned so a caller can see it.
StatichaltWhether a full reconcile must not mutate. A deregister-only stop is never halted: it is the call that removes this task.
Staticipv4The first private IPv4 address on a task, from an ECS attachment detail
or a container network interface, or from the task-metadata document's
Containers[].Networks[].IPv4Addresses.
the address, or ''
StaticisWhether value is an IPv4 address with no leading zeros. A leading zero
is rejected so a metadata field that is not an address cannot be
registered.
StaticisWhether task was started by one of this cluster's node services.
ECS names a service's tasks' group service:<service name>, and the
node services are <cluster>-node-a, -node-b, ... (environment/
ecs.tf). Anything else RUNNING in the cluster — the suite runner and
the cell conversion are run-task tasks here (family:...), and a
service added later would be another name — is not a node, and its
address in a SPIFFE target group would be a target nothing answers on
(#674's review, #695).
a DescribeTasks entry
this cluster's name
StaticisWhether digits is a TCP port written without a leading zero.
StaticisWhether name is one of prefix's SPIFFE target groups: <prefix>-sp-
and a port, or a cell's <prefix>-s and a port. -sp- is tried first,
so <prefix>-sp-8092 is not read as -s plus p-8092. <prefix>-https
and the other four service groups match neither.
the target group's name
this cluster's name
StaticlistEvery page of DescribeTargetGroups. The action cannot be scoped to an ARN, so the caller filters by name.
StaticlistThe RUNNING tasks' ARNs in cluster. Paged.
StaticloadThe AWS clients, or null when either package is not installed. Both are
optional peers (package.json); an image that was not built with them
records STS-CLUSTER-0027 rather than failing to load.
StaticnoteLogs STS-CLUSTER-0027 once per outage and returns the line, which the caller throws so the scheduler records the run as failed.
StaticonThe front process, after its listeners are bound. A failure is caught: the service is already answering, and the next job retries.
StaticonDeregisters this task's address. Never rejects: shutdown is going on
with or without the load balancer. opts.timeoutMs shortens the wait,
which a test uses; a stop passes nothing and waits STOP_MS.
The one-shot timer does not reschedule itself. The reconcile is the periodic work, and it is the scheduler's job.
Optionalopts: {StaticreadThis task's cluster and address from base + /task.
ECS_CONTAINER_METADATA_URI_V4
StaticreadReads url over HTTP. The task-metadata address is http, and the
socket timeout is the request's own timeout — a setTimeout call
here would be a timer this module does not have.
StaticreconcileCompares opts.elb's SPIFFE groups with the running addresses.
opts.tasks is the addresses ListTasks returned. opts.self.ip is
unioned in, so a task the list does not have yet is still registered.
opts.deregisterOnly removes opts.self.ip and registers nothing.
opts.stopping true (or beginStop() having been called) makes a full
reconcile leave the groups alone.
StaticreconcileReconciles from task metadata and the AWS clients.
With no metadata address this is a no-op and does not throw. opts.self,
opts.clients, opts.tasks and opts.loadClients are how a test runs
the same path without the network or the SDKs. A failure is logged once
and thrown.
Optionalopts: {StaticrecoveredClears the outage after a reconcile that succeeded.
StaticselfThis task's cluster and address from a metadata document.
StaticwhyWhy the job is off, or '' when it should run. The metadata address is
set by ECS on a Fargate task and inherited by every process of it.
The SPIFFE target-group reconcile (#323).