test: persist nested-e2e edgeHub store across container recreate (diagnostic) - #7529
test: persist nested-e2e edgeHub store across container recreate (diagnostic)#7529jlian wants to merge 4 commits into
Conversation
… L4/L5 support bundles Not for merge. Two temporary changes to investigate the consistently-failing RouteMessageL3LeafToL4Module nested-e2e test (AMQP-only): 1. e2e-run.yaml: narrow the nestededge_amqp filter to the smallest set that reproduces the failure (Module + Metrics + IoTEdgeCheck + RouteMessage), derived from PR #7521's bisection (run 20260701.8 first-failing subset). 2. nested-e2e.yaml: add a Collect_Nested_Bundles job that captures support bundles + raw module logs from ALL levels (L3/L4/L5) after the test stage. The default pipeline only collects the L3 bundle, so the L4 relayer/edgeHub logs that explain the 4-minute store-and-forward stall are never captured.
…dle collection) The temporary category filter narrowed and reordered the nested suite, causing RouteMessage to run first before relayer1 was deployed on L4 (a different failure than the original 15s upstream blip). Revert the filter so the full suite runs with RouteMessage in its normal late position; keep only the Collect_Nested_Bundles job so L4/L5 evidence is captured without perturbing the test flow.
CreateDeviceIdentityAsync now deletes+recreates on DeviceAlreadyExists so an orphaned identity from a prior killed run doesn't block the RouteMessage repro.
…diagnostic) The nested-e2e edgeHub stores store-and-forward messages at the default /tmp/edgeHub, which lives in the container's ephemeral writable layer. When the AMQP-group redeploy recreates the L4 edgeHub container mid-test, any queued/undelivered message is lost with the wiped store. Mount a host directory (/etc/iotedge/storage) and point edgeHub's StorageFolder at it so the message store survives an edgeHub container recreate. edgeHub's entrypoint (hubStart.sh) creates and chowns $StorageFolder/edgeHub to the edgehub uid, so no host-side prep is needed. Diagnostic intent: separate two hypotheses for RouteMessageL3LeafToL4Module. If the test passes with a persistent store, the failing message was being lost to the container-recreate store wipe. If it still stalls, the message is orphaned within a surviving store (the edgeHub store-and-forward re-pump / checkpoint defect that #7528 targets).
|
Result of the diagnostic run (172076620, this branch @ f3c7076, ci-build 20260706.1 = plain main, no #7528): RouteMessage still failed at +300s, but the run does not actually test the hypothesis, for two reasons.
To make this a valid experiment it would need the bind on the MQTT base too (shared host path) and |
Summary
The nested-E2E edgeHub stores store-and-forward messages at the default
/tmp/edgeHub, which lives in the container's ephemeral writable layer. When the AMQP-group redeploy recreates the L4 edgeHub container mid-test, any queued or undelivered message is lost with the wiped store.This mounts a host directory (
/etc/iotedge/storage) into edgeHub and points itsStorageFolderat it, so the message store survives an edgeHub container recreate. edgeHub's entrypoint (hubStart.sh) creates and chowns$StorageFolder/edgeHubto the edgehub uid at startup, so no host-side preparation is needed.Applies to both middle-layer AMQP deployments (
nestededge_middleLayerBaseDeployment_amqp.jsonandnestededge_middleLayer_e2e_amqp.json).Why (diagnostic)
Investigating why
RouteMessageL3LeafToL4Modulefails, the message the test waits on is stranded when the L4 edgeHub container is delete+recreated by the mid-test deployment reconcile. Because the store is ephemeral, the queued message is destroyed with the old container rather than being retried on reconnect.This change is a diagnostic to separate two hypotheses:
Draft scope
Draft, not for merge as-is. This is a targeted experiment to inform the durable edgeHub store-and-forward fix. If persistent storage is the right long-term posture for the nested-E2E rig (arguably it is, since store-and-forward across a restart is a real customer scenario), the mount path and provisioning should be reviewed for the CI agents.