MTConnect: live-gate the refused-connection fast path; expose CommsLossConfirmMs in the AdminUI #852

Closed
opened 2026-11-11 05:24:28 -05:00 by dohertj2 · 2 comments
Owner

From #846. A refused Agent connection now marks subscribed values BadNoCommunication after CommsLossConfirmMs (default 2000 ms) instead of waiting for the ~90 s watchdog. Remaining:

  • only unit-tested; live-gate it by stopping an Agent (a dedicated one, not the shared fixture other work relies on) and watching an OPC UA client;
  • CommsLossConfirmMs is JSON-only — the AdminUI form preserves it but has no field;
  • native MTConnect alarm conditions still get Bad quality only when the watchdog fires; the fast path covers data values only.
From #846. A refused Agent connection now marks subscribed values BadNoCommunication after `CommsLossConfirmMs` (default 2000 ms) instead of waiting for the ~90 s watchdog. Remaining: - only unit-tested; live-gate it by stopping an Agent (a dedicated one, not the shared fixture other work relies on) and watching an OPC UA client; - `CommsLossConfirmMs` is JSON-only — the AdminUI form preserves it but has no field; - native MTConnect alarm conditions still get Bad quality only when the watchdog fires; the fast path covers data values only.
dohertj2 added the type:followuppriority:p3 labels 2026-11-11 05:24:28 -05:00
Author
Owner

Progress (Pushed to master in 03e51457., 340d9d26): AdminUI MTConnect form has a "Comms-loss confirm (ms)" field (negatives preserved; JSON pinned through the driver parser); native MTConnect conditions now get quality-only BadNoCommunication on a confirmed refused connection and recover to Good without re-raise. A dedicated gate Agent overlay docker-dev/docker-compose.mtconnect-gate.yml keeps the hostname resolving while the Agent is stopped (a plain container stop gives a DNS failure = ambiguous = watchdog path); recipe in docs/drivers/MTConnect.md. Keeping open for the live gate on docker-dev.

Progress (Pushed to master in `03e51457`., `340d9d26`): AdminUI MTConnect form has a "Comms-loss confirm (ms)" field (negatives preserved; JSON pinned through the driver parser); native MTConnect conditions now get quality-only `BadNoCommunication` on a confirmed refused connection and recover to Good without re-raise. A dedicated gate Agent overlay `docker-dev/docker-compose.mtconnect-gate.yml` keeps the hostname resolving while the Agent is stopped (a plain container stop gives a DNS failure = ambiguous = watchdog path); recipe in docs/drivers/MTConnect.md. Keeping open for the live gate on docker-dev.
Author
Owner

Live gate PASS on docker-dev (03e51457, gate overlay docker-dev/docker-compose.mtconnect-gate.yml, driver seeded against http://mtconnect-gate:5000, CommsLossConfirmMs 2000):

  • Agent killed 13:27:15.19 (container FinishedAt — mtconnect/agent ignores SIGTERM, so compose stop kills at the 10 s grace) ⇒ log refused every connection for 2001 ms (definite loss); marking 2 subscribed value(s) BadNoCommunication + annotated 1 native condition(s) BadNoCommunication at 13:27:17; subscribed x_pos went BadNoCommunication at 13:27:17 (2.0 s, was ~94–118 s via the watchdog). The x_travel condition got one event, state kept Inactive/Acknowledged.
  • Agent restarted 13:27:42 ⇒ the condition got one more event (Inactive/Acknowledged — no re-raise), values Good again at 13:28:05; the ~23 s lag is the /sample reconnect backoff (attempt 9 ≈ 26 s), not the fast path. RE-BROWSE chip raised for the new instanceId as documented.
    Recorded in docs/drivers/MTConnect.md (b4ab403c). The UI field was not round-tripped in the browser on this pass (unit-pinned).
Live gate PASS on docker-dev (`03e51457`, gate overlay `docker-dev/docker-compose.mtconnect-gate.yml`, driver seeded against `http://mtconnect-gate:5000`, `CommsLossConfirmMs` 2000): - Agent killed 13:27:15.19 (container FinishedAt — `mtconnect/agent` ignores SIGTERM, so `compose stop` kills at the 10 s grace) ⇒ log `refused every connection for 2001 ms (definite loss); marking 2 subscribed value(s) BadNoCommunication` + `annotated 1 native condition(s) BadNoCommunication` at 13:27:17; subscribed `x_pos` went `BadNoCommunication` at 13:27:17 (**2.0 s**, was ~94–118 s via the watchdog). The `x_travel` condition got one event, state kept Inactive/Acknowledged. - Agent restarted 13:27:42 ⇒ the condition got one more event (Inactive/Acknowledged — no re-raise), values Good again at 13:28:05; the ~23 s lag is the `/sample` reconnect backoff (attempt 9 ≈ 26 s), not the fast path. RE-BROWSE chip raised for the new instanceId as documented. Recorded in docs/drivers/MTConnect.md (`b4ab403c`). The UI field was not round-tripped in the browser on this pass (unit-pinned).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#852