Raise netlink buffers for large batches; restore snapshot when try apply fails
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

This commit is contained in:
2026-10-04 15:34:08 +11:00
parent 1e32bde555
commit fe689e99ed
5 changed files with 154 additions and 7 deletions
+3 -3
View File
@@ -89,10 +89,10 @@ func tryApply(cfg *config.Config, fallback time.Duration) (string, error) {
return "", err
}
if err := engine.Apply(changes); err != nil {
if derr := tryapply.Discard(); derr != nil {
err = fmt.Errorf("%w (discarding snapshot: %v)", err, derr)
if aerr := tryapply.Abort(); aerr != nil {
return "", fmt.Errorf("applying changes: %w; %v; the revert timer restores the previous ruleset within %s", err, aerr, fallback)
}
return "", fmt.Errorf("applying changes: %w", err)
return "", fmt.Errorf("applying changes: %w: previous ruleset restored", err)
}
return id, nil
}