Skip to content

test: persist nested-e2e edgeHub store across container recreate (diagnostic)#7529

Draft
jlian wants to merge 4 commits into
mainfrom
jlian/nested-e2e-persistent-edgehub-store
Draft

test: persist nested-e2e edgeHub store across container recreate (diagnostic)#7529
jlian wants to merge 4 commits into
mainfrom
jlian/nested-e2e-persistent-edgehub-store

Conversation

@jlian

@jlian jlian commented Jul 13, 2026

Copy link
Copy Markdown
Member

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 its 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 at startup, so no host-side preparation is needed.

Applies to both middle-layer AMQP deployments (nestededge_middleLayerBaseDeployment_amqp.json and nestededge_middleLayer_e2e_amqp.json).

Why (diagnostic)

Investigating why RouteMessageL3LeafToL4Module fails, 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:

  • If RouteMessage passes with a persistent store, the failing message was purely lost to the container-recreate store wipe (a test-rig gap).
  • If it still stalls, the message is orphaned within a surviving store, which isolates the defect to edgeHub's store-and-forward re-pump on reconnect.

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.

jlian added 4 commits July 10, 2026 13:31
… 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant