bgp / stayrtr

RPKI-To-Router server implementation in Go
BSD 3-Clause "New" or "Revised" License
91 stars 13 forks source link

Grace period for diff #70

Closed ties closed 2 years ago

ties commented 2 years ago

When a VRP disappears from one input it may not disappear from the other input at the same time. Because a VRP is not present in one input, that has been present in the other input for a long time, an alert may fire immediately if the other source does not get updated before that alert fires.

This commits adds a grace period during which elements that disappear from one source do not cause alerts (yet).

ties commented 2 years ago

WIP because I'm running this functionality in testing at the moment

ties commented 2 years ago

This ran well overnight. I added some tests, which probably can improve in style 🙂

job commented 2 years ago

Thanks @ties

ties commented 2 years ago

It should work to set -grace.period as a commandline argument.

Twenty minutes may be short depending on your setup. Hoever, in practice it will be until the next update after 20 minutes, which probably is better.

On Tue, Jul 12, 2022, 22:22 Tony Tauber @.***> wrote:

@.**** commented on this pull request.

In cmd/rtrmon/rtrmon.go https://github.com/bgp/stayrtr/pull/70#discussion_r919393635:

@@ -55,6 +55,7 @@ var (

UserAgent = flag.String("useragent", fmt.Sprintf("StayRTR-%v (+https://github.com/bgp/stayrtr)", AppVersion), "User-Agent header") DisableConditionalRequests = flag.Bool("disable.conditional.requests", false, "Disable conditional requests (using If-None-Match/If-Modified-Since headers)")

  • GracePeriod = flag.Duration("grace.period", time.Minute*20, "Grace period during which objects removed from a source are not considered for the diff")

I'm just skimming really and no expert in Golang either. Is there a way to set this GracePeriod via configuration file?

— Reply to this email directly, view it on GitHub https://github.com/bgp/stayrtr/pull/70#pullrequestreview-1036431759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQTEXW3EG7JPBSCVPEDULVTXHWVANCNFSM53HPATQQ . You are receiving this because you were mentioned.Message ID: @.***>