Summary
docs/tutorials/snapshots.rst ("Zero-Config Entity Freeze-Frames", "Plugin-backed entities") says a plugin-backed entity that loses its link gets a freeze frame with the plugin's last known values and connected: false.
On an OPC UA gateway that lost its controller, the fault carries no freeze frame. GET /api/v1/components/openplc_a/faults/PLC_COMMS_LOST serves one rosbag entry and nothing else, on the confirm edge and after two gateway restarts with the fault standing:
"snapshots": [
{"type": "rosbag", "name": "rosbag_PLC_COMMS_LOST",
"bulk_data_uri": "/components/openplc_a/bulk-data/rosbags/PLC_COMMS_LOST",
"duration_sec": 6.0, "format": "sqlite3", "size_bytes": 33575}
]
Cause: PLC_COMMS_LOST is reported by the component openplc_a, and a component serves no data.
GET /api/v1/components/openplc_a/data answers 404, No data provider for plugin entity 'openplc_a'
x-plc-data is registered on apps only. GET /api/v1/components/openplc_a/x-plc-data answers 404.
- The capture's route fallback builds
/apps/openplc_a/x-plc-data, which answers 400, Entity 'openplc_a' is a Component, not a App.
Those are the two sources the entity freeze-frame capture has. The hosted app load_process does serve data during the outage (GET /api/v1/apps/load_process/x-plc-data answers with the last polled values and connected: false), and its own faults get frames. The values exist one level below the entity the fault landed on.
Proposed solution
- When the reporting entity is a component with no data provider, capture from the entities it hosts.
GET /api/v1/components/openplc_a/faults already lists the hosted app's faults with their source_id, so the relation is available at capture time.
- Have the plugin export a component-level data provider with the last known values and
connected: false.
- Or state in
snapshots.rst that plugin freeze frames are captured for app entities only.
Additional context
Reproduced on ghcr.io/selfpatch/ros2_medkit-jazzy at f873448 (0.6.0) and on a 0.7.0 build carrying #660. ROS 2 Jazzy, Ubuntu 24.04, OPC UA plugin on an OpenPLC-style controller with a node map, link cut by stopping the controller.
#564 stopped the capture refusing a payload with connected: false, but this fault lands on an entity that serves no payload. #562 added the startup catch-up, which the restarts above exercise. #515 (declared collections) and #663 (points through /apps/{id}/data) change where the points are served and give the component nothing to read.
Summary
docs/tutorials/snapshots.rst("Zero-Config Entity Freeze-Frames", "Plugin-backed entities") says a plugin-backed entity that loses its link gets a freeze frame with the plugin's last known values andconnected: false.On an OPC UA gateway that lost its controller, the fault carries no freeze frame.
GET /api/v1/components/openplc_a/faults/PLC_COMMS_LOSTserves onerosbagentry and nothing else, on the confirm edge and after two gateway restarts with the fault standing:Cause:
PLC_COMMS_LOSTis reported by the componentopenplc_a, and a component serves no data.GET /api/v1/components/openplc_a/dataanswers 404,No data provider for plugin entity 'openplc_a'x-plc-datais registered on apps only.GET /api/v1/components/openplc_a/x-plc-dataanswers 404./apps/openplc_a/x-plc-data, which answers 400,Entity 'openplc_a' is a Component, not a App.Those are the two sources the entity freeze-frame capture has. The hosted app
load_processdoes serve data during the outage (GET /api/v1/apps/load_process/x-plc-dataanswers with the last polled values andconnected: false), and its own faults get frames. The values exist one level below the entity the fault landed on.Proposed solution
GET /api/v1/components/openplc_a/faultsalready lists the hosted app's faults with theirsource_id, so the relation is available at capture time.connected: false.snapshots.rstthat plugin freeze frames are captured for app entities only.Additional context
Reproduced on
ghcr.io/selfpatch/ros2_medkit-jazzyat f873448 (0.6.0) and on a 0.7.0 build carrying #660. ROS 2 Jazzy, Ubuntu 24.04, OPC UA plugin on an OpenPLC-style controller with a node map, link cut by stopping the controller.#564 stopped the capture refusing a payload with
connected: false, but this fault lands on an entity that serves no payload. #562 added the startup catch-up, which the restarts above exercise. #515 (declared collections) and #663 (points through/apps/{id}/data) change where the points are served and give the component nothing to read.