@mark1russell7/kind 0.11.1 → 0.11.2
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/build/index.d.ts +3 -2
- package/build/index.js +31 -17
- package/build/index.js.map +1 -1
- package/build/{judge-Bb4ebE9V.js → judge-C09uZiha.js} +3 -2
- package/build/{judge-Bb4ebE9V.js.map → judge-C09uZiha.js.map} +1 -1
- package/build/{judge-C3mbgYxY.d.ts → judge-DrMgsOZ0.d.ts} +9 -1
- package/build/judge.d.ts +1 -1
- package/build/judge.js +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as updatesOf, $t as Declaration, A as TriggerV1, An as nodeNames, At as rulesOf, B as RunCheck, Bt as ztunnelPodsOf, C as KindCellResult, Cn as NODE_IMAGES, Ct as outcomesOf, D as PredictionV1, Dn as goDuration, Dt as requestsOf, E as LoadSample, En as cidrRange, Et as recordsOf, F as KIND_NOISE, Ft as slicesOf, G as judgeKind, Gt as PORT, H as checkRun, Ht as CLIENT, I as KindDecision, It as socketsOf, J as propagationOf, Jt as bandOf, K as observationAfter, Kt as REDIS, L as KindVerdict, Lt as stoppingOf, M as upgrade, Mn as scenarioProblems, Mt as signalsOf, N as upgradeCell, Nt as sliceDropOf, O as RunCheckV1, On as kindConfig, Ot as restartOf, P as Deleted, Pt as sliceEmptyOf, Q as unitOf, Qt as Band, R as LAST_SLACK, Rt as transitionOf, S as KindCellRecordV1, Sn as KubeProxyMode, St as kernelCounts, T as KindVerdictV1, Tn as cidrOverlap, Tt as podsOf, U as deletionsOf, Ut as HEALTH_PORT, V as RunFacts, Vt as ztunnelReplaced, W as factsOf, Wt as LOG_LABEL, X as referenceOf, Xt as secondsOf, Y as propagationSource, Yt as seconds, Z as reusesReset, Zt as showBand, _ as ClusterManifest, _n as WindowPrediction, _t as dropOf, a as STAGES, an as MeshFlavor, at as RecordLine, b as FORMAT_V1, bn as KindConfig, bt as intakeOf, c as readRecord, cn as Prediction, ct as SliceLine, d as calibrationOf, dn as Replica, dt as TunnelLine, en as EdgeProtocol, et as Endpoint, f as cellsTable, fn as ResetReuse, ft as ZtunnelPodLine, g as BandV1, gn as TriggerKind, gt as deletionOf, h as timeSpread, hn as Trigger, ht as byNode, i as quantileOf, in as Mesh, it as PropagationSource, j as judge, jn as scenario, jt as signalOf, k as RunFactsV1, kn as kubeProxyPatch, kt as restartsAt, l as Judged, ln as RedisDeclaration, lt as SocketLine, m as predictionText, mn as Template, mt as byClients, n as medianInterval, nn as KindRun, nt as Line, o as kindCellRecordSchema, on as MeshMode, ot as Request, p as medianText, pn as Stack, pt as backendsAt, q as observationEnd, qt as SERVER, r as middle, rn as KubeletProbe, rt as PodLine, s as kindCellRecordV1Schema, sn as PodSettings, st as RulesLine, t as RELATIVE, tn as KindCell, tt as HBONE_PORT, u as TimeSpread, un as Reference, ut as TCP_STATE, v as EnvironmentManifest, vn as Workload, vt as emptyOf, w as KindCellV1, wn as NodeImage, wt as podsAt, x as KindCellRecord, xn as KindScenario, xt as isTunnelState, y as FORMAT, yn as KUBE_PROXY_MODES, yt as failuresOf, z as Propagated, zt as tunnelsOf } from "./judge-
|
|
1
|
+
import { $ as updatesOf, $t as Declaration, A as TriggerV1, An as nodeNames, At as rulesOf, B as RunCheck, Bt as ztunnelPodsOf, C as KindCellResult, Cn as NODE_IMAGES, Ct as outcomesOf, D as PredictionV1, Dn as goDuration, Dt as requestsOf, E as LoadSample, En as cidrRange, Et as recordsOf, F as KIND_NOISE, Ft as slicesOf, G as judgeKind, Gt as PORT, H as checkRun, Ht as CLIENT, I as KindDecision, It as socketsOf, J as propagationOf, Jt as bandOf, K as observationAfter, Kt as REDIS, L as KindVerdict, Lt as stoppingOf, M as upgrade, Mn as scenarioProblems, Mt as signalsOf, N as upgradeCell, Nt as sliceDropOf, O as RunCheckV1, On as kindConfig, Ot as restartOf, P as Deleted, Pt as sliceEmptyOf, Q as unitOf, Qt as Band, R as LAST_SLACK, Rt as transitionOf, S as KindCellRecordV1, Sn as KubeProxyMode, St as kernelCounts, T as KindVerdictV1, Tn as cidrOverlap, Tt as podsOf, U as deletionsOf, Ut as HEALTH_PORT, V as RunFacts, Vt as ztunnelReplaced, W as factsOf, Wt as LOG_LABEL, X as referenceOf, Xt as secondsOf, Y as propagationSource, Yt as seconds, Z as reusesReset, Zt as showBand, _ as ClusterManifest, _n as WindowPrediction, _t as dropOf, a as STAGES, an as MeshFlavor, at as RecordLine, b as FORMAT_V1, bn as KindConfig, bt as intakeOf, c as readRecord, cn as Prediction, ct as SliceLine, d as calibrationOf, dn as Replica, dt as TunnelLine, en as EdgeProtocol, et as Endpoint, f as cellsTable, fn as ResetReuse, ft as ZtunnelPodLine, g as BandV1, gn as TriggerKind, gt as deletionOf, h as timeSpread, hn as Trigger, ht as byNode, i as quantileOf, in as Mesh, it as PropagationSource, j as judge, jn as scenario, jt as signalOf, k as RunFactsV1, kn as kubeProxyPatch, kt as restartsAt, l as Judged, ln as RedisDeclaration, lt as SocketLine, m as predictionText, mn as Template, mt as byClients, n as medianInterval, nn as KindRun, nt as Line, o as kindCellRecordSchema, on as MeshMode, ot as Request, p as medianText, pn as Stack, pt as backendsAt, q as observationEnd, qt as SERVER, r as middle, rn as KubeletProbe, rt as PodLine, s as kindCellRecordV1Schema, sn as PodSettings, st as RulesLine, t as RELATIVE, tn as KindCell, tt as HBONE_PORT, u as TimeSpread, un as Reference, ut as TCP_STATE, v as EnvironmentManifest, vn as Workload, vt as emptyOf, w as KindCellV1, wn as NodeImage, wt as podsAt, x as KindCellRecord, xn as KindScenario, xt as isTunnelState, y as FORMAT, yn as KUBE_PROXY_MODES, yt as failuresOf, z as Propagated, zt as tunnelsOf } from "./judge-DrMgsOZ0.js";
|
|
2
2
|
import { Quantity } from "@mark1russell7/quantity";
|
|
3
3
|
import { CheckFn, Finding, HealthServer, Poll, Rule, Scenario, ServiceBuilder, ServiceDescription, Stage, StopWay, Timing, TransportImpl, Verdict } from "@mark1russell7/service";
|
|
4
4
|
import { BuildImage } from "@mark1russell7/harness";
|
|
@@ -109,7 +109,8 @@ export declare const hostsOf: (text: string, cluster: string) => ClusterHosts;
|
|
|
109
109
|
*/
|
|
110
110
|
/**
|
|
111
111
|
* A target is a process or a pod of the cell:
|
|
112
|
-
* - `server` is the first replica of the service, in the sequence of its name.
|
|
112
|
+
* - `server` is the first replica of the service, in the sequence of its name. The injector acts in
|
|
113
|
+
* its network namespace only, with each client pod as a peer: the partition of one replica.
|
|
113
114
|
* - `redis` is the Redis pod.
|
|
114
115
|
* - `kube-proxy` is kube-proxy on the first worker.
|
|
115
116
|
* - `servers` is each replica of the service. Only the injector, a middlebox and a sysctl take it.
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as signalOf, A as medianInterval, B as emptyOf, C as propagationOf, D as unitOf, E as reusesReset, F as backendsAt, G as outcomesOf, H as intakeOf, I as byClients, J as recordsOf, K as podsAt, L as byNode, M as quantileOf, N as HBONE_PORT, O as updatesOf, P as TCP_STATE, Q as rulesOf, R as deletionOf, S as observationEnd, T as referenceOf, U as isTunnelState, V as failuresOf, W as kernelCounts, X as restartOf, Y as requestsOf, Z as restartsAt, _ as checkRun, _t as seconds, a as calibrationOf, at as stoppingOf, b as judgeKind, c as predictionText, ct as ztunnelPodsOf, d as FORMAT_V1, dt as HEALTH_PORT, et as signalsOf, f as judge, ft as LOG_LABEL, g as LAST_SLACK, gt as bandOf, h as KIND_NOISE, ht as SERVER, i as readRecord, it as socketsOf, j as middle, k as RELATIVE, l as timeSpread, lt as ztunnelReplaced, m as upgradeCell, mt as REDIS, n as kindCellRecordSchema, nt as sliceEmptyOf, o as cellsTable, ot as transitionOf, p as upgrade, pt as PORT, q as podsOf, r as kindCellRecordV1Schema, rt as slicesOf, s as medianText, st as tunnelsOf, t as STAGES, tt as sliceDropOf, u as FORMAT, ut as CLIENT, v as deletionsOf, vt as secondsOf, w as propagationSource, x as observationAfter, y as factsOf, yt as showBand, z as dropOf } from "./judge-
|
|
1
|
+
import { $ as signalOf, A as medianInterval, B as emptyOf, C as propagationOf, D as unitOf, E as reusesReset, F as backendsAt, G as outcomesOf, H as intakeOf, I as byClients, J as recordsOf, K as podsAt, L as byNode, M as quantileOf, N as HBONE_PORT, O as updatesOf, P as TCP_STATE, Q as rulesOf, R as deletionOf, S as observationEnd, T as referenceOf, U as isTunnelState, V as failuresOf, W as kernelCounts, X as restartOf, Y as requestsOf, Z as restartsAt, _ as checkRun, _t as seconds, a as calibrationOf, at as stoppingOf, b as judgeKind, c as predictionText, ct as ztunnelPodsOf, d as FORMAT_V1, dt as HEALTH_PORT, et as signalsOf, f as judge, ft as LOG_LABEL, g as LAST_SLACK, gt as bandOf, h as KIND_NOISE, ht as SERVER, i as readRecord, it as socketsOf, j as middle, k as RELATIVE, l as timeSpread, lt as ztunnelReplaced, m as upgradeCell, mt as REDIS, n as kindCellRecordSchema, nt as sliceEmptyOf, o as cellsTable, ot as transitionOf, p as upgrade, pt as PORT, q as podsOf, r as kindCellRecordV1Schema, rt as slicesOf, s as medianText, st as tunnelsOf, t as STAGES, tt as sliceDropOf, u as FORMAT, ut as CLIENT, v as deletionsOf, vt as secondsOf, w as propagationSource, x as observationAfter, y as factsOf, yt as showBand, z as dropOf } from "./judge-C09uZiha.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, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -849,9 +849,10 @@ const middleboxCommands = (peers, idle, port) => {
|
|
|
849
849
|
/**
|
|
850
850
|
* This function gives the target of a reset or a black hole of a cell. In T07 and T18 it is Redis,
|
|
851
851
|
* with the replicas as peers. In T15 the fault is on the mesh leg between the client pods and the
|
|
852
|
-
* replicas. It is a rule in each replica, with the client pods as peers.
|
|
852
|
+
* replicas. It is a rule in each replica, with the client pods as peers. A partition (`partition`)
|
|
853
|
+
* is a rule in the target replica only, with the client pods as peers.
|
|
853
854
|
*/
|
|
854
|
-
const linkOf = (cell) => cell.template === "T15" ? "servers" : "redis";
|
|
855
|
+
const linkOf = (cell) => cell.trigger.partition === true ? "server" : cell.template === "T15" ? "servers" : "redis";
|
|
855
856
|
/** This function gives the fault plan of a cell. */
|
|
856
857
|
const planOf = (cell) => {
|
|
857
858
|
const ns = ["-n", "{namespace}"];
|
|
@@ -1024,19 +1025,30 @@ const planOf = (cell) => {
|
|
|
1024
1025
|
target: "clients",
|
|
1025
1026
|
signal: "SIGUSR2"
|
|
1026
1027
|
}] : [];
|
|
1027
|
-
const prepare = [
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1028
|
+
const prepare = [
|
|
1029
|
+
...trigger.partition === true ? [{
|
|
1030
|
+
do: "signal",
|
|
1031
|
+
target: "clients",
|
|
1032
|
+
signal: "SIGHUP"
|
|
1033
|
+
}, {
|
|
1034
|
+
do: "wait",
|
|
1035
|
+
time: SPREAD_LEAD
|
|
1036
|
+
}] : [],
|
|
1037
|
+
...retries === void 0 ? [] : [{
|
|
1038
|
+
do: "sysctl",
|
|
1039
|
+
target: "clients",
|
|
1040
|
+
key: SYSCTL.retries,
|
|
1041
|
+
value: String(retries)
|
|
1042
|
+
}],
|
|
1043
|
+
...quiet ? [{
|
|
1044
|
+
do: "signal",
|
|
1045
|
+
target: "clients",
|
|
1046
|
+
signal: "SIGUSR1"
|
|
1047
|
+
}, {
|
|
1048
|
+
do: "wait",
|
|
1049
|
+
time: QUIET_LEAD
|
|
1050
|
+
}] : []
|
|
1051
|
+
];
|
|
1040
1052
|
return {
|
|
1041
1053
|
...prepare.length === 0 ? {} : { prepare },
|
|
1042
1054
|
inject: [{
|
|
@@ -3104,7 +3116,8 @@ const replicasOf = (ctx) => {
|
|
|
3104
3116
|
const INJECT_LEAD_MS = 700;
|
|
3105
3117
|
/**
|
|
3106
3118
|
* This function puts the rules of an action in the network namespace of each replica, with each
|
|
3107
|
-
* client pod as a peer
|
|
3119
|
+
* client pod as a peer. The target `servers` gives all replicas, and `server` the target replica alone.
|
|
3120
|
+
* The rules of all replicas commit at one instant on
|
|
3108
3121
|
* CLOCK_MONOTONIC (`--at`). Thus no client meets one replica with the rule and one without it. The
|
|
3109
3122
|
* replicas of one node go one after the other, and the nodes at the same time.
|
|
3110
3123
|
*
|
|
@@ -3301,6 +3314,7 @@ const doStep = async (ctx, step, replicas, background) => {
|
|
|
3301
3314
|
}
|
|
3302
3315
|
case "inject": {
|
|
3303
3316
|
if (step.target === "servers") return injectServers(ctx, step.action, replicas);
|
|
3317
|
+
if (step.target === "server") return injectServers(ctx, step.action, [target]);
|
|
3304
3318
|
const at = await where(step.target);
|
|
3305
3319
|
let first = null;
|
|
3306
3320
|
for (const replica of replicas) {
|