Skip to content

Conversation

@vihu
Copy link
Contributor

@vihu vihu commented Jan 16, 2026

Summary

Fix #2657

This PR addresses the bug by basically ensuring that we call contains method in the ip_to_index helper function; this makes certain that the ip is actually within ranges; without this safety check, when deleting the activator would essentially panic and fail to restart.

Without Fix

    activator_interface_delete_test.go:89:
        	Error Trace:	/home/rahul/malbec-labs/doublezero/e2e/activator_interface_delete_test.go:89
        	Error:      	Should be true
        	Test:       	TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/verify_activator_running
        	Messages:   	activator container is not running - it likely crashed
--- FAIL: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP (181.13s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/create_loopback_with_out_of_pool_ip (0.53s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/wait_for_interface_activation (14.01s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/delete_interface_with_out_of_pool_ip (5.53s)
    --- FAIL: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/verify_activator_running (0.00s)
FAIL
exit status 1
FAIL	github.com/malbeclabs/doublezero/e2e	227.649s
make: *** [Makefile:21: test] Error 1

With Fix

2026-01-17 01:37:41 INF ==> Verifying activator container is still running
2026-01-17 01:37:41 INF --> Activator is still running
=== RUN   TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/verify_interface_removed
2026-01-17 01:37:41 INF ==> Verifying interface is removed from chain
2026-01-17 01:37:49 INF --> Interface successfully removed from chain
--- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP (190.70s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/create_loopback_with_out_of_pool_ip (0.53s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/wait_for_interface_activation (14.01s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/delete_interface_with_out_of_pool_ip (6.04s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/verify_activator_running (0.00s)
    --- PASS: TestE2E_ActivatorInterfaceDeleteOutOfPoolIP/verify_interface_removed (8.01s)
PASS
ok  	github.com/malbeclabs/doublezero/e2e	240.147s

@vihu vihu marked this pull request as ready for review January 16, 2026 21:38
Copy link
Contributor

@ben-malbeclabs ben-malbeclabs left a comment

Choose a reason for hiding this comment

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

LGTM

@vihu vihu merged commit 19cbc91 into main Jan 20, 2026
21 checks passed
@vihu vihu deleted the rg/fix-2657 branch January 20, 2026 14:22
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.

activator: panic when setting an out-of-range IP

3 participants