fix(sysctl_tuning): complete fix36 production reconcile and bbr modules-load lifecycle
This commit is contained in:
@@ -289,6 +289,7 @@ impl Config {
|
||||
|
||||
pub fn validate_sysctl_tuning_runtime(&self) -> anyhow::Result<()> {
|
||||
self.validate_config()?;
|
||||
self.check_supported_host()?;
|
||||
|
||||
if !self.sysctl_tuning.enabled {
|
||||
return Ok(());
|
||||
@@ -742,7 +743,13 @@ swappiness = 1
|
||||
let mut cfg = base_config();
|
||||
cfg.sysctl_tuning.enabled = false;
|
||||
cfg.sysctl_tuning.tcp_bbr = "auto".into();
|
||||
assert!(cfg.validate_sysctl_tuning_runtime().is_ok());
|
||||
if let Err(e) = cfg.validate_sysctl_tuning_runtime() {
|
||||
let msg = e.to_string();
|
||||
assert!(
|
||||
!msg.contains("modprobe"),
|
||||
"validation must not require modprobe when sysctl_tuning is disabled, got error: {msg}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user