From 00c39cd1e9b4838fb51b48a62c434bc10f25a531 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 13 Sep 2025 11:07:20 +0200 Subject: vyos.ifconfig: T7814: suppress unnecessary syslog noise from missing nftables rules When tearing down interfaces without VRF bindings, nftables may attempt to remove non-existent rules. This results in repetitive error messages in syslog, e.g.: Sep 13 10:27:59 python3[90301]: DEBUG/IFCONFIG returned (err): Sep 13 10:27:59 Error[90301]: Could not process rule: No such file or directory Sep 13 10:27:59 python3[90301]: delete element inet vrf_zones ct_iface_map { "eth1.1337" } Sep 13 10:27:59 python3[90301]: Such output is noise and provides no operational value. The rule removal logic has been adjusted to silently ignore errors when the interface or rule is already absent, ensuring nftables cleanup proceeds when needed while keeping syslogs clean and meaningful. --- python/vyos/ifconfig/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index 3b3536301..8101fdcc3 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -416,7 +416,7 @@ class Interface(Control): def _nft_check_and_run(self, nft_command): # Check if deleting is possible first to avoid raising errors - _, err = self._popen(f'nft --check {nft_command}') + _, err = self._popen(f'nft --check {nft_command} 2>/dev/null') if not err: # Remove map element self._cmd(f'nft {nft_command}') -- cgit v1.2.3