@mark1russell7/kind 0.13.4 → 0.14.1

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.
@@ -431,6 +431,10 @@ interface ResetReuse<A = Quantity> {
431
431
  * the socket of its last request before the fault. With `window`, the failed requests also start in that window.
432
432
  * With `of: "tunnel"`, the HBONE connection of the ztunnel of each client ends in the band instead.
433
433
  * With `answer`, the close of the peer in that band is an answer to the close of the client.
434
+ * - `reconnects`: a producer of a message broker gets its connection again after its broker stops
435
+ * (`ReconnectsPrediction`). The lookups name another broker in the band `flip`. Each producer is back
436
+ * at the first try of its backoff after that change, and its sends fail only until then.
437
+ * With `owner: "either"`, the stopped broker can start again and take the topic back.
434
438
  * - `measured`: no document bounds the outcome. The run keeps the measurement.
435
439
  */
436
440
  type Prediction<A = Quantity> = NonePrediction | WindowPrediction<A> | {
@@ -479,10 +483,49 @@ type Prediction<A = Quantity> = NonePrediction | WindowPrediction<A> | {
479
483
  */
480
484
  readonly answer?: Band<A> | undefined;
481
485
  readonly why: string;
482
- } | {
486
+ } | ReconnectsPrediction<A> | {
483
487
  readonly kind: "measured";
484
488
  readonly why: string;
485
489
  };
490
+ /**
491
+ * A backoff is the delays of a client between its tries to connect again. The first delay is
492
+ * `initial`, and each next delay is two times the last, up to `max`. One delay is shorter: the try
493
+ * after it comes `mandatoryStop` after the first delay. The client takes a random share of up to
494
+ * `jitter` from each delay. A failed try takes up to `attempt`.
495
+ */
496
+ interface Backoff<A = Quantity> {
497
+ readonly initial: A;
498
+ readonly max: A;
499
+ readonly mandatoryStop: A;
500
+ readonly jitter: number;
501
+ readonly attempt: A;
502
+ }
503
+ /**
504
+ * A reconnects prediction is the return of the producers of a broker after the stop of the broker
505
+ * that owns their topic (SYS-56). Each band is from the fault.
506
+ */
507
+ interface ReconnectsPrediction<A = Quantity> {
508
+ readonly kind: "reconnects";
509
+ /** This band is the first lookup that names another broker as the owner of the topic. */
510
+ readonly flip: Band<A>;
511
+ /**
512
+ * This value says which broker owns the topic after the change. With `other`, the default, a lookup
513
+ * names another broker. With `either`, the stopped broker can start again and take the topic back.
514
+ * Then the lookups name one broker before and after the change, and only `flip` bounds the tries.
515
+ */
516
+ readonly owner?: "other" | "either" | undefined;
517
+ /** This time is the most from the change of the owner to the first lookup that names it. */
518
+ readonly probe: A;
519
+ /** This band is the first delay of each producer before its first try. */
520
+ readonly disconnect: Band<A>;
521
+ /** This backoff is the delays of each producer between its tries. */
522
+ readonly backoff: Backoff<A>;
523
+ /** This band is from the try that succeeds to the producer on the new owner. */
524
+ readonly setup: Band<A>;
525
+ /** These outcomes are the only failures of a send. */
526
+ readonly outcomes: readonly string[];
527
+ readonly why: string;
528
+ }
486
529
  /** A prediction of no failure: no request fails in the run, or none with an outcome of `outcomes`. */
487
530
  interface NonePrediction {
488
531
  readonly kind: "none";
@@ -644,6 +687,8 @@ interface KindRun {
644
687
  readonly target: Replica | null;
645
688
  /** This node is the node whose kube-proxy paused, or null. */
646
689
  readonly paused: string | null;
690
+ /** This pod is the broker that owned the topic at the fault, for a cell with a broker (`KindCell.pulsar`). */
691
+ readonly broker?: string | undefined;
647
692
  readonly replicas: readonly Replica[];
648
693
  readonly void: string | null;
649
694
  readonly lines: ReadonlyArray<{
@@ -686,6 +731,24 @@ interface KindCell<A = Quantity> {
686
731
  * each request to the VIP. Without it, the cell has no VIP.
687
732
  */
688
733
  readonly vip?: VipSettings | undefined;
734
+ /**
735
+ * This broker is Apache Pulsar (SYS-56). With it, the cluster has Pulsar, and `clients` more pods
736
+ * send messages to one topic and look up its owner. Without it, the cell has no broker.
737
+ */
738
+ readonly pulsar?: PulsarSettings | undefined;
739
+ /**
740
+ * This count is the CPUs, 1 or less, that a process outside the cluster keeps busy before each run
741
+ * (SYS-95). The load starts after the baseline of the environment. Thus this cell tests that the
742
+ * quiet gate refuses a loaded VM, and each of its runs is void when the gate holds.
743
+ */
744
+ readonly plannedLoad?: number | undefined;
745
+ }
746
+ /** These are the settings of the broker of a cell (`KindCell.pulsar`). */
747
+ interface PulsarSettings {
748
+ /** This count is the pods of the producers, one on each worker. */
749
+ readonly clients: number;
750
+ /** This time is between two lookups of the owner of the topic by each client pod. */
751
+ readonly probe: Quantity;
689
752
  }
690
753
  /** This name is an announcer of a VIP: kube-vip in ARP mode (SYS-51), or MetalLB in L2 mode (SYS-53). */
691
754
  type VipAnnouncerName = "kube-vip" | "metallb";
@@ -695,6 +758,18 @@ interface VipSettings {
695
758
  readonly clients: number;
696
759
  /** This name is the announcer of the VIP (`announcer.ts`). Without it, the announcer is kube-vip. */
697
760
  readonly announcer?: VipAnnouncerName | undefined;
761
+ /**
762
+ * These are the settings of memberlist for the speakers of MetalLB (SYS-57). With them, the install
763
+ * writes the config file of memberlist, with each other value of `DefaultLANConfig`. Without them,
764
+ * the install writes no file.
765
+ */
766
+ readonly memberlist?: MemberlistSettings | undefined;
767
+ }
768
+ /** A cell can change these settings of memberlist: the probe interval, the wait for an ack, and the multiplier of the suspicion timeout. */
769
+ interface MemberlistSettings {
770
+ readonly probeInterval: Quantity;
771
+ readonly probeTimeout: Quantity;
772
+ readonly suspicionMult: number;
698
773
  }
699
774
  //#endregion
700
775
  //#region src/bands.d.ts
@@ -1109,6 +1184,25 @@ interface RunFacts<A = Quantity> {
1109
1184
  * with fewer than 2 requests of each client does not have it. A record before SYS-41 does not have it.
1110
1185
  */
1111
1186
  readonly period?: Period<A> | undefined;
1187
+ /**
1188
+ * These are the facts of the return of the producers (`reconnects`, SYS-56). They are the first
1189
+ * lookup with another owner, the gap of the lookups before it, each producer, and the failed sends
1190
+ * by outcome. Each time is from the fault, but `gap`.
1191
+ */
1192
+ readonly reconnects?: ReconnectsFacts<A> | undefined;
1193
+ }
1194
+ /** These are the facts of the return of the producers of a run (`RunFacts.reconnects`). */
1195
+ interface ReconnectsFacts<A = Quantity> {
1196
+ readonly flip: A | null;
1197
+ readonly gap: A | null;
1198
+ readonly returns: ReadonlyArray<{
1199
+ readonly pod: string;
1200
+ readonly disconnect: A | null;
1201
+ readonly back: A | null;
1202
+ readonly setup: A | null;
1203
+ readonly tries: number;
1204
+ }>;
1205
+ readonly failures: Readonly<Record<string, number>>;
1112
1206
  }
1113
1207
  /** A deleted replica is a replica of a run that got a deletion. It gives its pod, and the stamps of its intake (or null) and of its deletion. */
1114
1208
  interface Deleted {
@@ -1234,12 +1328,17 @@ declare const judgeKind: (cell: KindCell, runs: readonly KindRun[]) => KindVerdi
1234
1328
  declare const FORMAT = "systems.kind-cell-record/2";
1235
1329
  /** This format is the first format. Its bands, its medians and its times are numbers. */
1236
1330
  declare const FORMAT_V1 = "systems.kind-cell-record/1";
1237
- /** A load sample is what the VM did in 4 s before a run: when (a stamp of the wall clock in milliseconds), its idle share, and its busiest processes. */
1331
+ /**
1332
+ * A load sample is what the VM did in 4 s before a run: when (a stamp of the wall clock in
1333
+ * milliseconds), its idle share, and its busiest processes. A sample of the gate has `needed`, the
1334
+ * idle share of the gate at that time. A baseline sample has no `needed`.
1335
+ */
1238
1336
  interface LoadSample {
1239
1337
  readonly t: number;
1240
1338
  readonly idle: number;
1241
1339
  readonly top: readonly string[];
1242
1340
  readonly foreign: readonly string[];
1341
+ readonly needed?: number | undefined;
1243
1342
  }
1244
1343
  /** A cluster manifest is what a run records about its cluster: the versions, the images, the nodes and the mode as read back. */
1245
1344
  interface ClusterManifest {
@@ -1393,5 +1492,95 @@ declare const quantileOf: (sorted: readonly number[], p: number) => number;
1393
1492
  */
1394
1493
  declare const medianInterval: (sorted: readonly number[]) => [number, number];
1395
1494
  //#endregion
1396
- export { unitOf as $, cidrRange as $n, OUTSIDE as $t, TriggerV1 as A, Reference as An, recordsOf as At, RunCheck as B, Workload as Bn, sliceReadyAt as Bt, KindCellResult as C, MeshFlavor as Cn, intakeOf as Ct, PredictionV1 as D, PodSettings as Dn, periodOf as Dt, LoadSample as E, PermittedWindow as En, outcomesOf as Et, KIND_NOISE as F, Trigger as Fn, sessionsAt as Ft, factsOf as G, KindScenario as Gn, transitionOf as Gt, checkRun as H, Dataplane as Hn, slicesOf as Ht, KindDecision as I, TriggerKind as In, signalOf as It, observationEnd as J, NodeImage as Jn, ztunnelReplaced as Jt, judgeKind as K, KubeProxyMode as Kn, tunnelsOf as Kt, KindVerdict as L, VipAnnouncerName as Ln, signalsOf as Lt, upgrade as M, ResetReuse as Mn, restartOf as Mt, upgradeCell as N, Stack as Nn, restartsAt as Nt, RunCheckV1 as O, Prediction as On, podsAt as Ot, Deleted as P, Template as Pn, rulesOf as Pt, reusesReset as Q, cidrOverlap as Qn, LOG_LABEL as Qt, LAST_SLACK as R, VipSettings as Rn, sliceDropOf as Rt, KindCellRecordV1 as S, Mesh as Sn, failuresOf as St, KindVerdictV1 as T, NonePrediction as Tn, kernelCounts as Tt, cyclesOf as U, KUBE_PROXY_MODES as Un, socketsOf as Ut, RunFacts as V, DATAPLANES as Vn, sliceReadyOf as Vt, deletionsOf as W, KindConfig as Wn, stoppingOf as Wt, propagationSource as X, ZONE_LABEL as Xn, HEALTH_PORT as Xt, propagationOf as Y, ZONE_KEPT as Yn, CLIENT as Yt, referenceOf as Z, ZONE_LOST as Zn, LB_CLASS as Zt, ClusterManifest as _, EdgeProtocol as _n, byClients as _t, STAGES as a, backlogEnd as an, scenario as ar, PodLine as at, FORMAT_V1 as b, KindRun as bn, dropOf as bt, readRecord as c, overshootBand as cn, Request as ct, calibrationOf as d, secondsOf as dn, SliceLine as dt, PORT as en, goDuration as er, updatesOf as et, cellsTable as f, showBand as fn, SocketLine as ft, BandV1 as g, Declaration as gn, backendsAt as gt, timeSpread as h, Cycle as hn, ZtunnelPodLine as ht, quantileOf as i, CountBand as in, nodeNames as ir, Period as it, judge as j, Replica as jn, requestsOf as jt, RunFactsV1 as k, RedisDeclaration as kn, podsOf as kt, Judged as l, requestBand as ln, RulesLine as lt, predictionText as m, Band as mn, TunnelLine as mt, medianInterval as n, SERVER as nn, kindConfig as nr, HBONE_PORT as nt, kindCellRecordSchema as o, bandOf as on, scenarioProblems as or, PropagationSource as ot, medianText as p, BacklogTerm as pn, TCP_STATE as pt, observationAfter as q, NODE_IMAGES as qn, ztunnelPodsOf as qt, middle as r, VIP_ANNOTATION as rn, kubeProxyPatch as rr, Line as rt, kindCellRecordV1Schema as s, drainBand as sn, zoneOf as sr, RecordLine as st, RELATIVE as t, REDIS as tn, isKubeProxyMode as tr, Endpoint as tt, TimeSpread as u, seconds as un, Sessions as ut, EnvironmentManifest as v, Flap as vn, byNode as vt, KindCellV1 as w, MeshMode as wn, isTunnelState as wt, KindCellRecord as x, KubeletProbe as xn, emptyOf as xt, FORMAT as y, KindCell as yn, deletionOf as yt, Propagated as z, WindowPrediction as zn, sliceEmptyOf as zt };
1397
- //# sourceMappingURL=judge-BZFTT0RL.d.ts.map
1495
+ //#region src/reconnects.d.ts
1496
+ /**
1497
+ * This module judges the return of the producers of a message broker after the stop of the broker
1498
+ * that owns their topic (SYS-56). It knows the backoff of a client and the lines of the lab, and
1499
+ * nothing of Pulsar. Each time is in milliseconds, on the clock of the lines.
1500
+ *
1501
+ * The backoff is the law of `Backoff::next` of the C++ client of Pulsar 4.2.0 (lib/Backoff.cc,
1502
+ * lines 33–57). The first delay is the initial delay, and each next delay is two times the last, up
1503
+ * to the most. The first call keeps its time. If a later call ends after the mandatory stop, it
1504
+ * gets the rest of the time to that stop, once. Then the call takes a random share of up to the
1505
+ * jitter from the delay. The delay is not below the initial delay at any time.
1506
+ */
1507
+ /** A try is the earliest and the latest time of one try to connect, after the first delay starts. */
1508
+ interface Try {
1509
+ readonly lo: number;
1510
+ readonly hi: number;
1511
+ }
1512
+ /**
1513
+ * This function gives the band of each try after the first delay starts, up to the first try whose
1514
+ * earliest time is after `until`. The earliest path has the most jitter and no time for a try. The
1515
+ * latest path has no jitter and `attempt` for each failed try. A later call gets a delay that ends no
1516
+ * earlier, thus each try of a path between them is in the band.
1517
+ */
1518
+ declare const triesOf: (backoff: Backoff, until: number) => Try[];
1519
+ /**
1520
+ * This function gives the latest return of a producer after the fault, from the bands of the
1521
+ * prediction. It adds three terms. The first is the first delay at its latest. The second is the
1522
+ * latest time of the first try that cannot come before the latest change of the owner. The third
1523
+ * is the latest setup.
1524
+ */
1525
+ declare const latestReturn: (prediction: ReconnectsPrediction) => number;
1526
+ /** A schedule is one call of the backoff of a producer: when, and its delay in milliseconds. */
1527
+ interface Schedule {
1528
+ readonly t: number;
1529
+ readonly delay: number;
1530
+ }
1531
+ /** A return is the facts of one producer in one run. */
1532
+ interface Return {
1533
+ readonly pod: string;
1534
+ /** This time is the first call of the backoff after the fault, from the fault. */
1535
+ readonly disconnect: number | null;
1536
+ /** These are the calls of the backoff from the fault to the producer on the new owner. */
1537
+ readonly schedules: readonly Schedule[];
1538
+ /** This time is the producer on the new owner, from the fault, or null. */
1539
+ readonly back: number | null;
1540
+ /** This time is from the try that succeeded to the producer on the new owner. */
1541
+ readonly setup: number | null;
1542
+ /** This count is the tries up to the one that succeeded. */
1543
+ readonly tries: number;
1544
+ readonly ok: boolean;
1545
+ readonly why: string;
1546
+ }
1547
+ /** A judgement is the facts of one run: the change of the owner, each producer, and the failed sends. */
1548
+ interface Reconnects {
1549
+ readonly ok: boolean;
1550
+ readonly why: string;
1551
+ /** This time is the first lookup that names another owner, from the fault, or null. */
1552
+ readonly flip: number | null;
1553
+ /** This time is from the last lookup before that change to it. */
1554
+ readonly gap: number | null;
1555
+ readonly returns: readonly Return[];
1556
+ /** This count is the sends of the producers that failed, by outcome. */
1557
+ readonly failures: Readonly<Record<string, number>>;
1558
+ /** This time is the median return of the producers, from the fault, or null. */
1559
+ readonly value: number | null;
1560
+ }
1561
+ /**
1562
+ * This function judges one run: the fault at `fault`, the broker `broker` that owned the topic, and
1563
+ * the lines of the run. A lookup line is `{ev: "lookup", t, o, owner}`, a line of the client is
1564
+ * `{ev: "pulsar", t, p, m}`, and a send is `{ev: "send", t, d, o, p}`. `timeout` and `every` are the
1565
+ * timeout and the interval of the sends. Each check has a margin of `noise`.
1566
+ *
1567
+ * For each producer, the delays of its backoff follow the law, from the observed time of each call.
1568
+ * Its last try comes after the last lookup that named the old owner. The try before it comes no
1569
+ * later than the first lookup that named another. Then the setup is in its band. Each failed send
1570
+ * starts between the fault and the return, with an outcome of the prediction. At least one fails.
1571
+ *
1572
+ * With `owner: "either"`, the lookups can name the old owner for the whole run, because it started
1573
+ * again and took the topic back. Then the last try comes after the start of the band `flip`. The
1574
+ * try before it comes no later than the end of that band.
1575
+ */
1576
+ declare const judgeReconnects: (prediction: ReconnectsPrediction, run: {
1577
+ readonly fault: number;
1578
+ readonly broker: string;
1579
+ readonly lines: readonly Line[];
1580
+ }, sends: {
1581
+ readonly timeout: number;
1582
+ readonly every: number;
1583
+ }, noise: number) => Reconnects;
1584
+ //#endregion
1585
+ export { factsOf as $, DATAPLANES as $n, transitionOf as $t, KindCellResult as A, KubeletProbe as An, failuresOf as At, upgradeCell as B, ReconnectsPrediction as Bn, restartOf as Bt, BandV1 as C, Band as Cn, ZtunnelPodLine as Ct, FORMAT_V1 as D, Flap as Dn, deletionOf as Dt, FORMAT as E, EdgeProtocol as En, byNode as Et, RunCheckV1 as F, NonePrediction as Fn, periodOf as Ft, LAST_SLACK as G, Stack as Gn, signalsOf as Gt, KIND_NOISE as H, Reference as Hn, rulesOf as Ht, RunFactsV1 as I, PermittedWindow as In, podsAt as It, RunCheck as J, TriggerKind as Jn, sliceReadyAt as Jt, Propagated as K, Template as Kn, sliceDropOf as Kt, TriggerV1 as L, PodSettings as Ln, podsOf as Lt, KindVerdictV1 as M, Mesh as Mn, isTunnelState as Mt, LoadSample as N, MeshFlavor as Nn, kernelCounts as Nt, KindCellRecord as O, KindCell as On, dropOf as Ot, PredictionV1 as P, MeshMode as Pn, outcomesOf as Pt, deletionsOf as Q, Workload as Qn, stoppingOf as Qt, judge as R, Prediction as Rn, recordsOf as Rt, timeSpread as S, Backoff as Sn, TunnelLine as St, EnvironmentManifest as T, Declaration as Tn, byClients as Tt, KindDecision as U, Replica as Un, sessionsAt as Ut, Deleted as V, RedisDeclaration as Vn, restartsAt as Vt, KindVerdict as W, ResetReuse as Wn, signalOf as Wt, checkRun as X, VipSettings as Xn, slicesOf as Xt, RunFacts as Y, VipAnnouncerName as Yn, sliceReadyOf as Yt, cyclesOf as Z, WindowPrediction as Zn, socketsOf as Zt, TimeSpread as _, requestBand as _n, scenario as _r, RulesLine as _t, judgeReconnects as a, LB_CLASS as an, NODE_IMAGES as ar, referenceOf as at, medianText as b, showBand as bn, SocketLine as bt, RELATIVE as c, PORT as cn, ZONE_LABEL as cr, updatesOf as ct, quantileOf as d, VIP_ANNOTATION as dn, cidrRange as dr, Line as dt, tunnelsOf as en, Dataplane as er, judgeKind as et, STAGES as f, CountBand as fn, goDuration as fr, Period as ft, Judged as g, overshootBand as gn, nodeNames as gr, Request as gt, readRecord as h, drainBand as hn, kubeProxyPatch as hr, RecordLine as ht, Try as i, HEALTH_PORT as in, KubeProxyMode as ir, propagationSource as it, KindCellV1 as j, MemberlistSettings as jn, intakeOf as jt, KindCellRecordV1 as k, KindRun as kn, emptyOf as kt, medianInterval as l, REDIS as ln, ZONE_LOST as lr, Endpoint as lt, kindCellRecordV1Schema as m, bandOf as mn, kindConfig as mr, PropagationSource as mt, Return as n, ztunnelReplaced as nn, KindConfig as nr, observationEnd as nt, latestReturn as o, LOG_LABEL as on, NodeImage as or, reusesReset as ot, kindCellRecordSchema as p, backlogEnd as pn, isKubeProxyMode as pr, PodLine as pt, ReconnectsFacts as q, Trigger as qn, sliceEmptyOf as qt, Schedule as r, CLIENT as rn, KindScenario as rr, propagationOf as rt, triesOf as s, OUTSIDE as sn, ZONE_KEPT as sr, unitOf as st, Reconnects as t, ztunnelPodsOf as tn, KUBE_PROXY_MODES as tr, observationAfter as tt, middle as u, SERVER as un, cidrOverlap as ur, HBONE_PORT as ut, calibrationOf as v, seconds as vn, scenarioProblems as vr, Sessions as vt, ClusterManifest as w, Cycle as wn, backendsAt as wt, predictionText as x, BacklogTerm as xn, TCP_STATE as xt, cellsTable as y, secondsOf as yn, zoneOf as yr, SliceLine as yt, upgrade as z, PulsarSettings as zn, requestsOf as zt };
1586
+ //# sourceMappingURL=judge-DLn2PLxb.d.ts.map