Garbage collection of unused dynamic BGP neighbours
Hi Is it possible to garbage collect unused dynamic BGP neighbours? In my environment, these come and go because the dynamic BGP neighbours are themselves quite dynamic (orchestrated containers that get a new IP address every time they are updated or restarted). This causes BIRD to accumulate non-Established «dynbgpN» protocol instances. I would like to get rid of them. Ideally the protocol instance would have vanished by itself the moment it exited the Established state, but since that does not happen, I am hoping there might be a way of deleting them manually (e.g., with birdc)? Tore
On Tue, Sep 20, 2022 at 09:32:31AM +0200, Tore Anderson via Bird-users wrote:
Hi
Is it possible to garbage collect unused dynamic BGP neighbours?
Hi i think that 'configure' CLI command should remove unused dynamic BGP instaces as a side-effect of its unused protocols cleanup code, even if there is no change in configuration. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
* Ondrej Zajicek
i think that 'configure' CLI command should remove unused dynamic BGP instaces as a side-effect of its unused protocols cleanup code, even if there is no change in configuration.
I had already tried that unsuccessfully, but did some more testing now and found out that it works IFF you manually disable the protocol instance first: $ birdc BIRD 2.0.10 ready. bird> show protocols dynbgp3 Name Proto Table State Since Info dynbgp3 BGP --- start 10:28:22.421 Passive Received: Administrative shutdown bird> configure Reading configuration from /etc/bird.conf Reconfigured bird> show protocols dynbgp3 Name Proto Table State Since Info dynbgp3 BGP --- start 10:28:22.421 Passive Received: Administrative shutdown bird> disable dynbgp3 dynbgp3: disabled bird> show protocols dynbgp3 Name Proto Table State Since Info dynbgp3 BGP --- down 10:29:02.779 bird> configure Reading configuration from /etc/bird.conf Reconfigured bird> show protocols dynbgp3 syntax error, unexpected CF_SYM_UNDEFINED, expecting END or CF_SYM_KNOWN or TEXT or ALL Thank you for pointing me in the right direction! If there's such a thing as a feature request list for BIRD, it would be nice to have a switch to have this done automatically added to it. After all, the client can always reconnect and get a new dynamic protocol instance. Tore
On 9/21/22 08:37, Tore Anderson via Bird-users wrote:
* Ondrej Zajicek
i think that 'configure' CLI command should remove unused dynamic BGP instaces as a side-effect of its unused protocols cleanup code, even if there is no change in configuration. I had already tried that unsuccessfully, but did some more testing now and found out that it works IFF you manually disable the protocol instance first:
$ birdc BIRD 2.0.10 ready. bird> show protocols dynbgp3 Name Proto Table State Since Info dynbgp3 BGP --- start 10:28:22.421 Passive Received: Administrative shutdown bird> configure Reading configuration from /etc/bird.conf Reconfigured bird> show protocols dynbgp3 Name Proto Table State Since Info dynbgp3 BGP --- start 10:28:22.421 Passive Received: Administrative shutdown bird> disable dynbgp3 dynbgp3: disabled bird> show protocols dynbgp3 Name Proto Table State Since Info dynbgp3 BGP --- down 10:29:02.779 bird> configure Reading configuration from /etc/bird.conf Reconfigured bird> show protocols dynbgp3 syntax error, unexpected CF_SYM_UNDEFINED, expecting END or CF_SYM_KNOWN or TEXT or ALL
Thank you for pointing me in the right direction!
If there's such a thing as a feature request list for BIRD, it would be nice to have a switch to have this done automatically added to it. After all, the client can always reconnect and get a new dynamic protocol instance.
I'd also really really like a feature like this, for my use case it would be very nice to maybe have a switch where you can set the garbage collection interval. Like 1 hour, 1 day, 1 week ... etc. -N
participants (3)
-
Nigel Kukard -
Ondrej Zajicek -
Tore Anderson