Skip to content

Commit 73c030c

Browse files
apply max path config during early networking (#9954)
When `mgd` starts up it has a default "bestpath fanout" value of 1. We added the ability to configure this to other values in R18, and nexus does configure it once it's up and running, but we didn't add the call to configure it during early networking. While ECMP isn't critical during the early networking phase, it makes sense to keep the environment consistent throughout the various phases of operation.
1 parent 14e53ad commit 73c030c

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

sled-agent/src/bootstrap/early_networking.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ use internal_dns_types::names::ServiceName;
1717
use mg_admin_client::Client as MgdClient;
1818
use mg_admin_client::types::{
1919
AddStaticRoute4Request, AddStaticRoute6Request, ApplyRequest,
20-
CheckerSource, ImportExportPolicy4 as MgImportExportPolicy4,
20+
BestpathFanoutRequest, CheckerSource,
21+
ImportExportPolicy4 as MgImportExportPolicy4,
2122
ImportExportPolicy6 as MgImportExportPolicy6, JitterRange, ShaperSource,
2223
StaticRoute4, StaticRoute4List, StaticRoute6, StaticRoute6List,
2324
};
@@ -691,6 +692,10 @@ impl<'a> EarlyNetworkSetup<'a> {
691692
.collect(),
692693
};
693694

695+
let fanout = BestpathFanoutRequest {
696+
fanout: config.max_paths.as_nonzero_u8(),
697+
};
698+
694699
if let Err(e) = mgd.bgp_apply_v2(&request).await {
695700
error!(
696701
self.log,
@@ -699,6 +704,15 @@ impl<'a> EarlyNetworkSetup<'a> {
699704
"configuration" => ?request,
700705
);
701706
}
707+
708+
if let Err(e) = mgd.update_rib_bestpath_fanout(&fanout).await {
709+
error!(
710+
self.log,
711+
"error while updating bestpath fanout";
712+
"error" => ?e,
713+
"configuration" => ?fanout,
714+
);
715+
}
702716
}
703717
}
704718

0 commit comments

Comments
 (0)