Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for internet gateways #6475

Merged
merged 36 commits into from
Oct 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
673d3a7
scaffolding for internet gateways
rcgoodfellow Aug 29, 2024
818c6a7
reticulating
rcgoodfellow Aug 29, 2024
e37fcd0
reticulating
rcgoodfellow Aug 30, 2024
a4d7c73
chores
rcgoodfellow Aug 30, 2024
d267d40
crud tests
rcgoodfellow Aug 31, 2024
e0d0bcd
implement delete logic
rcgoodfellow Sep 2, 2024
cc554b1
more testing
rcgoodfellow Sep 2, 2024
f8b4e6c
create default internet gateway on vpc create
rcgoodfellow Sep 2, 2024
a9f3fe1
hook up back end
rcgoodfellow Sep 3, 2024
cd1aa81
link/unlink default gateway with default ip pool
rcgoodfellow Sep 4, 2024
c7b81df
reticulating
rcgoodfellow Sep 4, 2024
9ca0a7a
resolve igw router targets to sled
rcgoodfellow Sep 5, 2024
45e8934
internet gateway route sync from nexus working
rcgoodfellow Sep 6, 2024
2c6dc3c
opte override plumbing for ci
rcgoodfellow Sep 6, 2024
3e36096
fix instance igw vpc route resolution
rcgoodfellow Sep 7, 2024
6f04859
activate vpc route manager on instance create/destroy/migrate
rcgoodfellow Sep 7, 2024
7f54ff2
update vpc route rpw to handle custom routers w/ igw targets
rcgoodfellow Sep 30, 2024
8a0c103
bump wait time for vpc route sync
rcgoodfellow Sep 30, 2024
4be2d8c
Synchronise EIP->IGW mappings as part of external IP cfg
FelixMcFelix Oct 2, 2024
9a39951
Trigger route RPW on External IP add
FelixMcFelix Oct 2, 2024
bd4a78e
Minor mid-review changes.
FelixMcFelix Oct 2, 2024
17a65c7
fix attach API
rcgoodfellow Oct 3, 2024
e69c862
review feedback
rcgoodfellow Oct 3, 2024
02231fa
Some extra route RPW version handling.
FelixMcFelix Oct 3, 2024
362ecc7
Remove parametrised IGW route code, add index for router
FelixMcFelix Oct 3, 2024
7733b5d
Correctly handle multiple IGW mappings in OPTE
FelixMcFelix Oct 3, 2024
a9fd9db
rebase fixup
rcgoodfellow Oct 3, 2024
e6fab2d
db migration + re-introduce subnet workarounds
rcgoodfellow Oct 5, 2024
9053239
Some more semantinc logging in pursuit pof test-gflake.
FelixMcFelix Oct 5, 2024
c550e26
Compaction of logs.
FelixMcFelix Oct 5, 2024
7a5e128
revert subnet workaround
rcgoodfellow Oct 5, 2024
7222c20
fmt
rcgoodfellow Oct 5, 2024
a341a7c
bump wait time for vpc sync on instance create test
rcgoodfellow Oct 5, 2024
d2c7d77
delete routes targeting igw on delete cascade
rcgoodfellow Oct 5, 2024
259f82e
sql pakled strikes again
rcgoodfellow Oct 6, 2024
1aee801
bump opte, clean up logging
rcgoodfellow Oct 6, 2024
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
Prev Previous commit
Next Next commit
Some more semantinc logging in pursuit pof test-gflake.
FelixMcFelix committed Oct 5, 2024
commit 9053239a973be5174640b4d846c282c63e110a24
22 changes: 16 additions & 6 deletions nexus/tests/integration_tests/instances.rs
Original file line number Diff line number Diff line change
@@ -6334,34 +6334,44 @@ pub async fn assert_sled_vpc_routes(
assert!(!system_routes.is_empty());

let condition = || async {
let sys_key = RouterId { vni, kind: RouterKind::System };
let custom_key = RouterId {
vni,
kind: RouterKind::Custom(db_subnet.ipv4_block.0.into()),
};

let vpc_routes = sled_agent.vpc_routes.lock().await;
let sys_routes_found = vpc_routes.iter().any(|(id, set)| {
*id == RouterId { vni, kind: RouterKind::System }
*id == sys_key
&& set.routes == system_routes
});
let custom_routes_found = vpc_routes.iter().any(|(id, set)| {
*id == RouterId {
vni,
kind: RouterKind::Custom(db_subnet.ipv4_block.0.into()),
} && set.routes == custom_routes
*id == custom_key && set.routes == custom_routes
});

if sys_routes_found && custom_routes_found {
Ok(())
} else {
let found_system = vpc_routes.get(&sys_key).cloned().unwrap_or_default();
let found_custom = vpc_routes.get(&custom_key).cloned().unwrap_or_default();

println!("unexpected route setup");
println!("vni: {vni:?}");
println!("subnet: {}", db_subnet.ipv4_block.0);
println!("expected system: {system_routes:#?}");
println!("expected custom {custom_routes:#?}");
println!("found: {vpc_routes:#?}");
println!("\n-----\nsystem diff (+): {:?}", system_routes.difference(&found_system.routes));
println!("system diff (-): {:?}", found_system.routes.difference(&system_routes));
println!("custom diff (+): {:?}", custom_routes.difference(&found_custom.routes));
println!("custom diff (-): {:?}\n-----", found_custom.routes.difference(&custom_routes));
Err(CondCheckError::NotYet::<()>)
}
};
wait_for_condition(
condition,
&Duration::from_secs(1),
&Duration::from_secs(65),
&Duration::from_secs(10),
)
.await
.expect("matching vpc routes should be present");
4 changes: 3 additions & 1 deletion sled-agent/src/sim/sled_agent.rs
Original file line number Diff line number Diff line change
@@ -957,7 +957,9 @@ impl SledAgent {
{
continue;
}
_ => {}
_ => {
println!("successfully installed routes {new:?}");
}
};

routes.insert(