From 01667006e6364f2933e642fa724fbaec4849f615 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 11 Oct 2025 20:05:02 +0200 Subject: frrender: T7764: add deletion marked for babel When deleting the daemon configuration, use the deleted dict element to properly inform FRR config render of absence of the configuration items. Nothing needs to be rendered. --- python/vyos/frrender.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index b3af4bf0a..fe5dab332 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -243,6 +243,8 @@ def get_frrender_dict(conf, argv=None) -> dict: get_first_key=True, with_recursive_defaults=True) dict.update({'babel' : babel}) + elif conf.exists_effective(babel_cli_path): + dict.update({'babel' : {'deleted' : ''}}) # We need to check the CLI if the BFD node is present and thus load in all the default # values present on the CLI - that's why we have if conf.exists() -- cgit v1.2.3 From f08442f2da5053a106e03e2fc2d06c0e04016b7e Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 11 Oct 2025 20:05:53 +0200 Subject: frrender: T7764: add deletion marker for bfd When deleting the daemon configuration, use the deleted dict element to properly inform FRR config render of absence of the configuration items. Nothing needs to be rendered. --- python/vyos/frrender.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index fe5dab332..b8b6435f1 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -255,6 +255,8 @@ def get_frrender_dict(conf, argv=None) -> dict: no_tag_node_value_mangle=True, with_recursive_defaults=True) dict.update({'bfd' : bfd}) + elif conf.exists_effective(bfd_cli_path): + dict.update({'bfd' : {'deleted' : ''}}) # We need to check the CLI if the BGP node is present and thus load in all the default # values present on the CLI - that's why we have if conf.exists() -- cgit v1.2.3 From e6b4bbb586c0e0459d7df2c0c961e559537fd307 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 11 Oct 2025 20:09:19 +0200 Subject: frrender: T7764: log to daemon facility instead of local7 FRR operates multiple daemons - use proper syslog facility. --- python/vyos/frrender.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index b8b6435f1..9504c4c2c 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -720,9 +720,11 @@ class FRRender: debug('FRR: START CONFIGURATION RENDERING') # we can not reload an empty file, thus we always embed the marker output = '!\n' + # Enable FRR logging output += 'log syslog\n' - output += 'log facility local7\n' + output += 'log facility daemon\n' + # Enable SNMP agentx support # SNMP AgentX support cannot be disabled once enabled if 'snmp' in config_dict: -- cgit v1.2.3 From 7ff824f4432c82048e72ea8ec9a6b644b6539bac Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 11 Oct 2025 20:10:24 +0200 Subject: frrender: T7764: add "log timestamp precision 3" global option --- python/vyos/frrender.py | 1 + 1 file changed, 1 insertion(+) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index 9504c4c2c..0207adeb2 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -724,6 +724,7 @@ class FRRender: # Enable FRR logging output += 'log syslog\n' output += 'log facility daemon\n' + output += 'log timestamp precision 3\n' # Enable SNMP agentx support # SNMP AgentX support cannot be disabled once enabled -- cgit v1.2.3 From c4c339fb5f7d786e587acb7a73f3d3fb0b1cd1c3 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 11 Oct 2025 20:13:43 +0200 Subject: frrender: T7764: reduce log level to notifications during normal operation There is no need for informational logging which adds quiet some noise to syslog. Informational logging can be enabled when FRR debug swtitch is set. --- python/vyos/frrender.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index 0207adeb2..983934aa8 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -722,9 +722,13 @@ class FRRender: output = '!\n' # Enable FRR logging - output += 'log syslog\n' output += 'log facility daemon\n' output += 'log timestamp precision 3\n' + # Exdtend logging depending on operating mode + if os.path.exists(frr_debug_enable): + output += 'log syslog informational\n' + else: + output += 'log syslog notifications\n' # Enable SNMP agentx support # SNMP AgentX support cannot be disabled once enabled -- cgit v1.2.3 From fca49413f5d949c1f8d6ee18828741c732bd8e5a Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 11 Oct 2025 20:14:43 +0200 Subject: frrender: T7764: do not log unique-id in syslog messages There is currently no use for us for unique transaction ids emitted by FRR to syslog. --- python/vyos/frrender.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/frrender.py b/python/vyos/frrender.py index 983934aa8..75824fcf9 100644 --- a/python/vyos/frrender.py +++ b/python/vyos/frrender.py @@ -724,11 +724,13 @@ class FRRender: # Enable FRR logging output += 'log facility daemon\n' output += 'log timestamp precision 3\n' - # Exdtend logging depending on operating mode + # Extend logging depending on operating mode if os.path.exists(frr_debug_enable): output += 'log syslog informational\n' + output += 'log unique-id\n' else: output += 'log syslog notifications\n' + output += 'no log unique-id\n' # Enable SNMP agentx support # SNMP AgentX support cannot be disabled once enabled -- cgit v1.2.3