e2e: remove activator container and consolidate to onchain allocation#3629
Draft
e2e: remove activator container and consolidate to onchain allocation#3629
Conversation
Drops the legacy-allocation BackwardCompatibility shard, floors the surviving (onchain) BackwardCompatibility shard at CLI 0.12.0, and removes the activator container from the e2e devnet entirely. All remaining shards now run with onchain allocation; the DZ_E2E_ONCHAIN_ALLOCATION and DZ_E2E_DISABLE_ACTIVATOR env knobs are gone. Closes #3609 Closes #3610 Closes #3611
…on under onchain allocation Two related bugs prevented the sentinel from creating multicast publishers once the activator was removed and onchain allocation became the only path: - smartcontract/serviceability: CreateDeviceInterface unconditionally overwrote a caller-supplied ip_net for any Loopback when use_onchain_allocation was true, allocating from the device-tunnel-block (172.16/16) instead. Now it only allocates when no ip_net was supplied, matching the existing behavior in interface/activate.rs. User-tunnel-endpoint loopbacks can again land on a globally routable IP rather than a private one that the user-create validation later rejects with InvalidTunnelEndpoint. - sentinel: build_create_multicast_publisher_instructions hard-coded dz_prefix_count = 0, so create_subscribe_user produced a Pending user with no resources allocated. Without an activator the user never reached Activated, the next poll cycle re-attempted creation, and the contract rejected it with AccountAlreadyInitialized. The sentinel now fetches device.dz_prefixes.len() and supplies the resource extension accounts so create+allocate+activate happens atomically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BackwardCompatibilitye2e shard (legacy allocation is going away).BackwardCompatibilityshard at CLI ≥ 0.12.0 and bumps onchainMIN_COMPATIBLE_VERSIONin the serviceability program to match. The 0.14.1 floor forlink acceptis already covered by the existingbefore("0.19.0")RFC-18 guard.DZ_E2E_ONCHAIN_ALLOCATIONandDZ_E2E_DISABLE_ACTIVATORenv knobs are deleted. Shard 3 (the standalone onchain-no-activator shard) is folded into the round-robin shards.smartcontract/serviceability:CreateDeviceInterfacewas unconditionally overwriting a caller-suppliedip_netfor any Loopback under onchain allocation, allocating from the device-tunnel-block (172.16/16) and clobbering the user-tunnel-endpoint IP the operator passed in. It now only allocates when noip_netwas supplied — matching the existinginterface/activate.rsbehavior. Without this,TestE2E_SentinelMulticastPublisherCreatesPublishersfailed because the sentinel picked the auto-allocated private IP astunnel_endpointand the contract rejected it withInvalidTunnelEndpoint(the per-useris_global(tunnel_endpoint)check).sentinel:build_create_multicast_publisher_instructionshard-codeddz_prefix_count = 0, socreate_subscribe_userproduced aPendingmulticast user with no resources allocated. With no activator to finish activation, the user never reachedActivated, the next poll cycle re-attempted creation, and the contract rejected it withAccountAlreadyInitialized. The sentinel now fetchesdevice.dz_prefixes.len()and supplies theResourceExtensionaccounts so create+allocate+activate happens atomically.After this PR, the e2e devnet has no path to start an activator — there is no environment variable that can re-enable it. Per the issue's note, breakage in onchain-allocation behavior is no longer masked by the activator picking up the slack; expect the first few CI runs to surface latent issues.
Closes #3609
Closes #3610
Closes #3611
Testing Verification
go vet -tags=e2e ./e2e/...clean.go build ./...clean.cargo test -p doublezero-serviceabilityandcargo clippy -p doublezero-serviceability --all-targets -- -Dclippy::all -Dwarningsclean after the `MIN_COMPATIBLE_VERSION` bump.