Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/e2e_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ def run_recovery_local_unsealing(
args = copy.deepcopy(const_args)
args.nodes = infra.e2e_args.min_nodes(args, f=1)
args.enable_local_sealing = True
args.label += "_unsealing"
args.label += f"_unsealing_{rekey}_{recovery_shares_refresh}"

with infra.network.network(args.nodes, args.binary_dir) as network:
network.start_and_open(args)
Expand All @@ -1448,13 +1448,13 @@ def run_recovery_local_unsealing(
if recovery_shares_refresh:
network.consortium.trigger_recovery_shares_refresh(primary)

network.stop_all_nodes()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why moving the stop_all_nodes() call will help. From my reading of the other comments, it sounds like trigger_recovery_shares_refresh is starting some async process which eventually results in a new sealed secret file being written to disk, and races with a future step that's trying to read that file. Stopping the nodes will terminate any in-progress writes sure, but seems like it's still possible that the sealed secret doesn't reach disk? If that's required for the future save/recovery, I think we should be explicitly waiting-for+checking it here.

If this is the risk, then we could force a repro by changing the trigger_ (or some step downstream of it) to be even-more-async. Dispatch its work to a delayed task rather than executing immediately, and we'll be forced to wait here.


node_secret_map = {
node.local_node_id: node.save_sealed_ledger_secret()
for node in network.nodes
}

network.stop_all_nodes()

prev_network = network
for node in network.nodes:
recovery_network_args = copy.deepcopy(args)
Expand Down
Loading