a27eff3298
Hooks the Bootstrap catch that previously went straight to Stale. On a cache hit the node serves its last-known-good configuration through the outage instead of coming up with an empty address space; on a miss, behaviour is byte-for-byte what it was. The read is unkeyed because ClusterId is only derivable from an artifact you already hold or from the unreachable central DB (recon D-1). Newest pointer wins, which is correct in every real topology - a node belongs to one cluster and its peer replicates that same row. Splits PushDesiredSubscriptionsFromArtifact out of PushDesiredSubscriptions: the cache path runs precisely when the ConfigDb read cannot succeed, so re-reading the artifact there would fail by definition. RunningFromCache is surfaced on NodeDiagnosticsSnapshot (optional param, existing call sites unaffected). A node running from cache looks entirely healthy from outside - full address space, live values - but its config is frozen and no deploy can reach it. It clears only on a real apply from central.
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using ZB.MOM.WW.OtOpcUa.Commons.Types;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Commons.Interfaces;
|
|
|
|
public sealed record DriverInstanceDiagnostics(
|
|
Guid DriverInstanceId,
|
|
string Name,
|
|
string State,
|
|
int ConnectedDevices,
|
|
int FaultedDevices,
|
|
DateTime LastChangeUtc);
|
|
|
|
/// <summary>
|
|
/// Per-node diagnostics returned by <c>IFleetDiagnosticsClient</c>. Populated by the node's
|
|
/// local <c>DriverHostActor</c> via a request/response over Akka.
|
|
/// </summary>
|
|
/// <param name="RunningFromCache">
|
|
/// True when the node booted its configuration from the node-local artifact cache because the
|
|
/// central ConfigDb was unreachable. Such a node looks entirely healthy — full address space,
|
|
/// live values — but its configuration is frozen and no deployment can reach it, so the state
|
|
/// needs to be explicitly visible rather than inferred. Defaults to false, which is also what
|
|
/// every node that booted normally reports.
|
|
/// </param>
|
|
public sealed record NodeDiagnosticsSnapshot(
|
|
NodeId NodeId,
|
|
RevisionHash? CurrentRevision,
|
|
IReadOnlyList<DriverInstanceDiagnostics> Drivers,
|
|
DateTime AsOfUtc,
|
|
bool RunningFromCache = false);
|