@mark1russell7/kind 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -96,6 +96,9 @@ The lab image (`image/`) holds the service of a cell on `@mark1russell7/service`
96
96
  - **In the workspace** of this repository, the stage builds `@mark1russell7/quantity`, `@mark1russell7/algebra` and `@mark1russell7/service`, and packs each one as npm gets it.
97
97
  - **From npm**, the stage packs the installed versions of the same packages. The package holds the files of the image, and `src/compose.ts` and `src/backends.ts`, for that.
98
98
  - **The service** (`app.mjs`) is a Node HTTP server. Its one controller needs Redis when the cell has Redis. Its health server gives the probes, and it declares each stage of the shutdown. `compose.ts` composes the service from the declaration of the cell, and `lint()` reads the same composition.
99
+ - **The HTTP edge of the service.** From 0.1.7, the service has no transport of its own. Its listener is `httpTransport` of `@mark1russell7/service/http`, and its probes are `probeServer` on the health port. Its one route is `handle()` over `life.request`.
100
+ - **The answers of the route.** A value gets 200, and a refusal or a cut of the shutdown gets 503. A failure of the route also gets 503, through the hook `failed`, as in 0.1.6. Thus the T07 and T18 cells count the same outcomes. Each 503 gets `Retry-After` of 1 s.
101
+ - **The knobs of the listener.** `server_idle_close` is 6 s, the real idle close of Node 24.21: `keepAliveTimeout` of 5 s and its buffer of 1 s. The sweep of idle connections comes each second after the stop of the intake.
99
102
  - **The seams** of the service are a flag file that fails its liveness check, and SIGUSR2. SIGUSR2 blocks its event loop for the time in a file.
100
103
  - **The clients** (`client.mjs`) send requests on new connections to the ClusterIP. Each request gives one line with its outcome: ok, 503, refused, reset, timeout or unreachable. From 0.1.3, each line also gives the local port of its connection (`lp`), a refused one's too. A conntrack entry is per port. Thus the requests on the port of a failure show the connection before it, and the pod that it went to.
101
104
 
@@ -128,6 +131,7 @@ The plan's `event:clock-jump` has no trigger. A step of CLOCK_REALTIME in the VM
128
131
 
129
132
  - **A deletion.** The listener of a leaving pod stays open for its preStop sleep and the hold of `fail readiness`. A connection fails when the rules of its node select the pod after that. `rules.ts` gives O04 with the hold as data, and `lint()` decides it.
130
133
  - **A pause of kube-proxy** keeps the rules of one node for its hold. The window on that node ends one propagation after the pause. A SYN_SENT entry of an earlier run lives up to 122 s, thus the window also opens up to 122 s before the intake. `predictionText` writes each end of a window with its band, for example `the intake + [-122, 4.605] s`.
134
+ - **A reset from a leaving pod** leaves the conntrack entry of its flow in CLOSE for 10 s, with the NAT to that pod. From 0.1.6, a window can give that life (`afterReset`). Then a request outside the window can fail with the outcome of the rule (`reusesReset`). The condition is a reset of the same client on the same port, up to that life before the request. The catalog gives it to a deletion without a hold, in the modes with the NAT in conntrack.
131
135
  - **A fault of a shared dependency** trips the readiness latch of each replica (`failSpan`). Then the kubelet needs its threshold of probes, and the rules need one propagation.
132
136
  - **A restart through a coupling** adds the liveness probes of the kubelet and the preStop sleep to the latch.
133
137
 
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as SliceLine, $t as goDuration, A as TriggerV1, At as showBand, B as RunFacts, Bt as Replica, C as KindCellResult, Ct as LOG_LABEL, D as PredictionV1, Dt as bandOf, E as LoadSample, Et as SERVER, F as KindDecision, Ft as KubeletProbe, G as referenceOf, Gt as KUBE_PROXY_MODES, H as factsOf, Ht as Trigger, I as KindVerdict, It as PodSettings, J as Line, Jt as KubeProxyMode, K as unitOf, Kt as KindConfig, L as LAST_SLACK, Lt as Prediction, M as upgrade, Mt as Declaration, N as upgradeCell, Nt as KindCell, O as RunCheckV1, Ot as seconds, P as KIND_NOISE, Pt as KindRun, Q as RulesLine, Qt as cidrRange, R as Propagated, Rt as RedisDeclaration, S as KindCellRecordV1, St as HEALTH_PORT, T as KindVerdictV1, Tt as REDIS, U as judgeKind, Ut as TriggerKind, V as checkRun, Vt as Template, W as propagationOf, Wt as Workload, X as RecordLine, Xt as NodeImage, Y as PodLine, Yt as NODE_IMAGES, Z as Request, Zt as cidrOverlap, _ as ClusterManifest, _t as sliceDropOf, a as STAGES, at as failuresOf, b as FORMAT_V1, bt as transitionOf, c as readRecord, ct as outcomesOf, d as calibrationOf, dt as recordsOf, en as kindConfig, et as backendsAt, f as cellsTable, ft as requestsOf, g as BandV1, gt as signalsOf, h as timeSpread, ht as signalOf, i as quantileOf, in as scenarioProblems, it as emptyOf, j as judge, jt as Band, k as RunFactsV1, kt as secondsOf, l as Judged, lt as podsAt, m as predictionText, mt as rulesOf, n as medianInterval, nn as nodeNames, nt as deletionOf, o as kindCellRecordSchema, ot as intakeOf, p as medianText, pt as restartsAt, q as Endpoint, qt as KindScenario, r as middle, rn as scenario, rt as dropOf, s as kindCellRecordV1Schema, st as kernelCounts, t as RELATIVE, tn as kubeProxyPatch, tt as byNode, u as TimeSpread, ut as podsOf, v as EnvironmentManifest, vt as sliceEmptyOf, w as KindCellV1, wt as PORT, x as KindCellRecord, xt as CLIENT, y as FORMAT, yt as slicesOf, z as RunCheck, zt as Reference } from "./judge-CKhPqBku.js";
1
+ import { $ as RulesLine, $t as cidrOverlap, A as TriggerV1, At as secondsOf, B as RunFacts, Bt as Reference, C as KindCellResult, Ct as HEALTH_PORT, D as PredictionV1, Dt as SERVER, E as LoadSample, Et as REDIS, F as KindDecision, Ft as KindRun, G as referenceOf, Gt as TriggerKind, H as factsOf, Ht as ResetReuse, I as KindVerdict, It as KubeletProbe, J as Endpoint, Jt as KindConfig, K as reusesReset, Kt as Workload, L as LAST_SLACK, Lt as PodSettings, M as upgrade, Mt as Band, N as upgradeCell, Nt as Declaration, O as RunCheckV1, Ot as bandOf, P as KIND_NOISE, Pt as KindCell, Q as Request, Qt as NodeImage, R as Propagated, Rt as Prediction, S as KindCellRecordV1, St as CLIENT, T as KindVerdictV1, Tt as PORT, U as judgeKind, Ut as Template, V as checkRun, Vt as Replica, W as propagationOf, Wt as Trigger, X as PodLine, Xt as KubeProxyMode, Y as Line, Yt as KindScenario, Z as RecordLine, Zt as NODE_IMAGES, _ as ClusterManifest, _t as signalsOf, a as STAGES, an as scenario, at as emptyOf, b as FORMAT_V1, bt as slicesOf, c as readRecord, ct as kernelCounts, d as calibrationOf, dt as podsOf, en as cidrRange, et as SliceLine, f as cellsTable, ft as recordsOf, g as BandV1, gt as signalOf, h as timeSpread, ht as rulesOf, i as quantileOf, in as nodeNames, it as dropOf, j as judge, jt as showBand, k as RunFactsV1, kt as seconds, l as Judged, lt as outcomesOf, m as predictionText, mt as restartsAt, n as medianInterval, nn as kindConfig, nt as byNode, o as kindCellRecordSchema, on as scenarioProblems, ot as failuresOf, p as medianText, pt as requestsOf, q as unitOf, qt as KUBE_PROXY_MODES, r as middle, rn as kubeProxyPatch, rt as deletionOf, s as kindCellRecordV1Schema, st as intakeOf, t as RELATIVE, tn as goDuration, tt as backendsAt, u as TimeSpread, ut as podsAt, v as EnvironmentManifest, vt as sliceDropOf, w as KindCellV1, wt as LOG_LABEL, x as KindCellRecord, xt as transitionOf, y as FORMAT, yt as sliceEmptyOf, z as RunCheck, zt as RedisDeclaration } from "./judge-BkaQ5zGz.js";
2
2
  import { Quantity } from "@mark1russell7/quantity";
3
3
  import { CheckFn, Finding, HealthServer, Poll, Rule, Scenario, ServiceBuilder, ServiceDescription, Stage, Timing, TransportImpl, Verdict } from "@mark1russell7/service";
4
4
  import { RedisClient } from "@mark1russell7/service/redis";
@@ -395,5 +395,5 @@ export declare const toolPath: (tool: Tool, key?: string, cache?: string) => str
395
395
  */
396
396
  export declare const ensureTool: (tool: Tool, key?: string, cache?: string) => Promise<string>;
397
397
  //#endregion
398
- export { type Band, type BandV1, CLIENT, type Cluster, type ClusterManifest, type Credentials, type Declaration, type DeletionWindow, Endpoint, type EnvironmentManifest, FORMAT, FORMAT_V1, type FaultPlan, HEALTH_PORT, type Judged, KIND_NOISE, KUBE_PROXY_MODES, type KindCell, type KindCellRecord, type KindCellRecordV1, type KindCellResult, type KindCellV1, type KindConfig, type KindDecision, type KindLab, type KindRun, type KindScenario, type KindVerdict, type KindVerdictV1, type KubeProxyMode, type KubeletProbe, LAST_SLACK, LOG_LABEL, Line, type LoadSample, NODE_IMAGES, type NodeImage, PORT, type Parts, PodLine, type PodSettings, type Prediction, type PredictionV1, type Propagated, type Propagation, REDIS, RELATIVE, RecordLine, type RedisDeclaration, type Reference, type Replica, Request, RulesLine, type RunCheck, type RunCheckV1, type RunFacts, type RunFactsV1, type RunOptions, SERVER, STAGES, type ServiceRule, SliceLine, type Stamp, type Step, type Target, type Template, type TimeSpread, type Tool, type Trigger, type TriggerKind, type TriggerV1, type Verdicts, type Workload, backendsAt, bandOf, byNode, calibrationOf, cellsTable, checkRun, cidrOverlap, cidrRange, deletionOf, dropOf, emptyOf, factsOf, failuresOf, goDuration, intakeOf, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, medianInterval, medianText, middle, nodeNames, outcomesOf, podsAt, podsOf, predictionText, propagationOf, quantileOf, readRecord, recordsOf, referenceOf, requestsOf, restartsAt, rulesOf, scenario, scenarioProblems, seconds, secondsOf, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, slicesOf, timeSpread, transitionOf, unitOf, upgrade, upgradeCell };
398
+ export { type Band, type BandV1, CLIENT, type Cluster, type ClusterManifest, type Credentials, type Declaration, type DeletionWindow, Endpoint, type EnvironmentManifest, FORMAT, FORMAT_V1, type FaultPlan, HEALTH_PORT, type Judged, KIND_NOISE, KUBE_PROXY_MODES, type KindCell, type KindCellRecord, type KindCellRecordV1, type KindCellResult, type KindCellV1, type KindConfig, type KindDecision, type KindLab, type KindRun, type KindScenario, type KindVerdict, type KindVerdictV1, type KubeProxyMode, type KubeletProbe, LAST_SLACK, LOG_LABEL, Line, type LoadSample, NODE_IMAGES, type NodeImage, PORT, type Parts, PodLine, type PodSettings, type Prediction, type PredictionV1, type Propagated, type Propagation, REDIS, RELATIVE, RecordLine, type RedisDeclaration, type Reference, type Replica, Request, type ResetReuse, RulesLine, type RunCheck, type RunCheckV1, type RunFacts, type RunFactsV1, type RunOptions, SERVER, STAGES, type ServiceRule, SliceLine, type Stamp, type Step, type Target, type Template, type TimeSpread, type Tool, type Trigger, type TriggerKind, type TriggerV1, type Verdicts, type Workload, backendsAt, bandOf, byNode, calibrationOf, cellsTable, checkRun, cidrOverlap, cidrRange, deletionOf, dropOf, emptyOf, factsOf, failuresOf, goDuration, intakeOf, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, medianInterval, medianText, middle, nodeNames, outcomesOf, podsAt, podsOf, predictionText, propagationOf, quantileOf, readRecord, recordsOf, referenceOf, requestsOf, restartsAt, reusesReset, rulesOf, scenario, scenarioProblems, seconds, secondsOf, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, slicesOf, timeSpread, transitionOf, unitOf, upgrade, upgradeCell };
399
399
  //# sourceMappingURL=index.d.ts.map
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as SERVER, A as dropOf, B as restartsAt, C as RELATIVE, D as backendsAt, E as quantileOf, F as outcomesOf, G as sliceEmptyOf, H as signalOf, I as podsAt, J as CLIENT, K as slicesOf, L as podsOf, M as failuresOf, N as intakeOf, O as byNode, P as kernelCounts, Q as REDIS, R as recordsOf, S as unitOf, T as middle, U as signalsOf, V as rulesOf, W as sliceDropOf, X as LOG_LABEL, Y as HEALTH_PORT, Z as PORT, _ as checkRun, a as calibrationOf, b as propagationOf, c as predictionText, d as FORMAT_V1, et as bandOf, f as judge, g as LAST_SLACK, h as KIND_NOISE, i as readRecord, j as emptyOf, k as deletionOf, l as timeSpread, m as upgradeCell, n as kindCellRecordSchema, nt as secondsOf, o as cellsTable, p as upgrade, q as transitionOf, r as kindCellRecordV1Schema, rt as showBand, s as medianText, t as STAGES, tt as seconds, u as FORMAT, v as factsOf, w as medianInterval, x as referenceOf, y as judgeKind, z as requestsOf } from "./judge-Cf97eOJm.js";
1
+ import { $ as REDIS, A as deletionOf, B as requestsOf, C as unitOf, D as quantileOf, E as middle, F as kernelCounts, G as sliceDropOf, H as rulesOf, I as outcomesOf, J as transitionOf, K as sliceEmptyOf, L as podsAt, M as emptyOf, N as failuresOf, O as backendsAt, P as intakeOf, Q as PORT, R as podsOf, S as reusesReset, T as medianInterval, U as signalOf, V as restartsAt, W as signalsOf, X as HEALTH_PORT, Y as CLIENT, Z as LOG_LABEL, _ as checkRun, a as calibrationOf, b as propagationOf, c as predictionText, d as FORMAT_V1, et as SERVER, f as judge, g as LAST_SLACK, h as KIND_NOISE, i as readRecord, it as showBand, j as dropOf, k as byNode, l as timeSpread, m as upgradeCell, n as kindCellRecordSchema, nt as seconds, o as cellsTable, p as upgrade, q as slicesOf, r as kindCellRecordV1Schema, rt as secondsOf, s as medianText, t as STAGES, tt as bandOf, u as FORMAT, v as factsOf, w as RELATIVE, x as referenceOf, y as judgeKind, z as recordsOf } from "./judge-C1ssYP7m.js";
2
2
  import { valueIn } from "@mark1russell7/quantity";
3
3
  import { execFile, execFileSync } from "node:child_process";
4
4
  import { chmodSync, copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
@@ -474,7 +474,7 @@ const WATCHDOG = "self.event-loop";
474
474
  * client, because the client declares the dependency and its checks.
475
475
  */
476
476
  const compose = (name, declaration, parts = {}) => {
477
- const svc = service(name).readiness(declaration.readiness).liveness(declaration.liveness).startup(declaration.startup).cooperativeWindow(declaration.cooperativeWindow);
477
+ const svc = service(name).readiness(declaration.readiness).liveness(declaration.liveness).startup(declaration.startup).cooperativeWindow(declaration.cooperativeWindow).onRepeatSignal("ignore");
478
478
  for (const coupling of declaration.couplings) svc.couple(coupling);
479
479
  if (declaration.redis !== null) {
480
480
  if (parts.redis === void 0) throw new Error(`${name} declares Redis, thus its composition needs the client`);
@@ -2360,6 +2360,6 @@ const shardOf = (cells, index, count) => {
2360
2360
  return out;
2361
2361
  };
2362
2362
  //#endregion
2363
- export { CLIENT, CONTROLLER, DOCUMENTED, DRAIN_RULES, FLAG_CHECK, FORMAT, FORMAT_V1, HEALTH_PORT, KEPT_KERNEL, KIND, KIND_NOISE, KUBECTL, KUBE_PROXY_MODES, LAST_SLACK, LOG_LABEL, NODE_IMAGES, O04, O09, O10, O16, PORT, REDIS, REDIS_IMAGE, RELATIVE, ROUTE, RULES_EVERY, SERVER, STAGES, WATCHDOG, backendsAt, backendsOf, bandOf, byNode, cacheFolder, calibrationOf, capOf, cellsTable, checkRun, cidrOverlap, cidrRange, clientObjects, compose, createCluster, deletes, deletionOf, deletionWindow, describeCell, dropOf, emptyOf, ensureTool, estimatedTime, factsOf, failuresOf, goDuration, intakeAfter, intakeOf, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, kubeletBand, labImage, latchBand, lintCell, localPin, medianInterval, medianText, middle, namespaceOf, nodeNames, openKindLab, outcomesOf, pausedWindow, planOf, platformKey, podsAt, podsOf, predictionText, probeOf, propagationOf, quantileOf, readRecord, recordsOf, redisObjects, referenceOf, removalBand, requestsOf, restartBand, restartsAt, rulesOf, runKindCells, scenario, scenarioOf, scenarioProblems, seconds, secondsOf, serverObjects, sha256, shardOf, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, slicesOf, stageLabImage, stallRemovalBand, timeSpread, toolPath, transitionOf, unitOf, upgrade, upgradeCell, verdictsOf, writeResult };
2363
+ export { CLIENT, CONTROLLER, DOCUMENTED, DRAIN_RULES, FLAG_CHECK, FORMAT, FORMAT_V1, HEALTH_PORT, KEPT_KERNEL, KIND, KIND_NOISE, KUBECTL, KUBE_PROXY_MODES, LAST_SLACK, LOG_LABEL, NODE_IMAGES, O04, O09, O10, O16, PORT, REDIS, REDIS_IMAGE, RELATIVE, ROUTE, RULES_EVERY, SERVER, STAGES, WATCHDOG, backendsAt, backendsOf, bandOf, byNode, cacheFolder, calibrationOf, capOf, cellsTable, checkRun, cidrOverlap, cidrRange, clientObjects, compose, createCluster, deletes, deletionOf, deletionWindow, describeCell, dropOf, emptyOf, ensureTool, estimatedTime, factsOf, failuresOf, goDuration, intakeAfter, intakeOf, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, kubeletBand, labImage, latchBand, lintCell, localPin, medianInterval, medianText, middle, namespaceOf, nodeNames, openKindLab, outcomesOf, pausedWindow, planOf, platformKey, podsAt, podsOf, predictionText, probeOf, propagationOf, quantileOf, readRecord, recordsOf, redisObjects, referenceOf, removalBand, requestsOf, restartBand, restartsAt, reusesReset, rulesOf, runKindCells, scenario, scenarioOf, scenarioProblems, seconds, secondsOf, serverObjects, sha256, shardOf, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, slicesOf, stageLabImage, stallRemovalBand, timeSpread, toolPath, transitionOf, unitOf, upgrade, upgradeCell, verdictsOf, writeResult };
2364
2364
 
2365
2365
  //# sourceMappingURL=index.js.map