Note: further details added in first comment, below
Confid dependency works incorrectly conntrack conntrack-sync
To reproduce:
set interfaces ethernet eth0 address '192.168.122.15/24' set interfaces ethernet eth0 address '192.168.77.15/24' set interfaces ethernet eth2 address '198.51.100.2/24' set interfaces bonding bond0 address '192.0.2.1/24' set interfaces bonding bond0 member interface 'eth3' set high-availability vrrp group ETH2 address 198.51.100.200/24 set high-availability vrrp group ETH2 hello-source-address '198.51.100.2' set high-availability vrrp group ETH2 interface 'eth2' set high-availability vrrp group ETH2 priority '200' set high-availability vrrp group ETH2 vrid '22' set high-availability vrrp sync-group GROUP member 'ETH2' set service conntrack-sync failover-mechanism vrrp sync-group 'GROUP' set service conntrack-sync interface bond0 peer '192.0.2.77'
Reboot the router and get vyos-configd configuration error
vyos@r15# compare [system] + conntrack { + modules { + ftp + h323 + nfs + pptp + sip + sqlnet + tftp + } + } [edit] vyos@r15#
log:
Aug 21 11:37:21 r15 sudo[1874]: pam_unix(sudo:session): session closed for user root Aug 21 11:37:21 r15 sudo[1942]: root : PWD=/ ; USER=root ; COMMAND=/usr/bin/sh -c '/usr/sbin/vyshim /usr/libexec/vyos/conf_mode/system_conntrack.py' Aug 21 11:37:21 r15 sudo[1942]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0) Aug 21 11:37:21 r15 vyos-configd[753]: Received message: {"type": "node", "last": false, "data": "/usr/libexec/vyos/conf_mode/system_conntrack.py"} Aug 21 11:37:21 r15 vyos-configd[753]: 'Interface' object has no attribute 'iftype' Aug 21 11:37:21 r15 vyos-configd[753]: Sending response 4 Aug 21 11:37:21 r15 python3[1953]: Report time: 2024-08-21 11:37:21 Aug 21 11:37:21 r15 python3[1953]: Image version: VyOS 1.5-rolling-202408210022 Aug 21 11:37:21 r15 python3[1953]: Release train: current Aug 21 11:37:21 r15 python3[1953]: Built by: autobuild@vyos.net Aug 21 11:37:21 r15 python3[1953]: Built on: Wed 21 Aug 2024 00:22 UTC Aug 21 11:37:21 r15 python3[1953]: Build UUID: 3ab1141d-9c4c-4fd3-abb5-d562241a0ac3 Aug 21 11:37:21 r15 python3[1953]: Build commit ID: c75174bb4a2230 Aug 21 11:37:21 r15 Architecture[1953]: x86_64 Aug 21 11:37:21 r15 python3[1953]: Boot via: installed image Aug 21 11:37:21 r15 python3[1953]: System type: KVM guest Aug 21 11:37:21 r15 python3[1953]: Hardware vendor: QEMU Aug 21 11:37:21 r15 python3[1953]: Hardware model: Standard PC (Q35 + ICH9, 2009) Aug 21 11:37:21 r15 python3[1953]: Hardware S/N: Aug 21 11:37:21 r15 python3[1953]: Hardware UUID: eb9e740f-6e5c-4444-a3df-f4c8dd4b6546 Aug 21 11:37:21 r15 python3[1953]: Traceback (most recent call last): Aug 21 11:37:21 r15 python3[1953]: File "/usr/libexec/vyos/conf_mode/system_conntrack.py", line 270, in <module> Aug 21 11:37:21 r15 python3[1953]: apply(c) Aug 21 11:37:21 r15 python3[1953]: File "/usr/libexec/vyos/conf_mode/system_conntrack.py", line 249, in apply Aug 21 11:37:21 r15 python3[1953]: call_dependents() Aug 21 11:37:21 r15 python3[1953]: File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 147, in call_dependents Aug 21 11:37:21 r15 python3[1953]: f() Aug 21 11:37:21 r15 python3[1953]: File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 118, in func_impl Aug 21 11:37:21 r15 python3[1953]: run_config_mode_script(script, config) Aug 21 11:37:21 r15 python3[1953]: File "/usr/lib/python3/dist-packages/vyos/configdep.py", line 106, in run_config_mode_script Aug 21 11:37:21 r15 python3[1953]: mod.verify(c) Aug 21 11:37:21 r15 python3[1953]: File "/usr/libexec/vyos//conf_mode/service_conntrack-sync.py", line 72, in verify Aug 21 11:37:21 r15 python3[1953]: if len(get_ipv4(interface)) < 1: Aug 21 11:37:21 r15 python3[1953]: ^^^^^^^^^^^^^^^^^^^ Aug 21 11:37:21 r15 python3[1953]: File "/usr/lib/python3/dist-packages/vyos/template.py", line 458, in get_ipv4 Aug 21 11:37:21 r15 python3[1953]: return Interface(interface).get_addr_v4() Aug 21 11:37:21 r15 python3[1953]: ^^^^^^^^^^^^^^^^^^^^ Aug 21 11:37:21 r15 python3[1953]: File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 334, in __init__ Aug 21 11:37:21 r15 python3[1953]: if not self.iftype: Aug 21 11:37:21 r15 python3[1953]: ^^^^^^^^^^^ Aug 21 11:37:21 r15 AttributeError[1953]: 'Interface' object has no attribute 'iftype' Aug 21 11:37:21 r15 noteworthy[1953]: Aug 21 11:37:21 r15 python3[1953]: cmd 'ip link show dev bond0' Aug 21 11:37:21 r15 python3[1953]: returned (out): Aug 21 11:37:21 r15 python3[1953]: returned (err): Aug 21 11:37:21 r15 python3[1953]: Device "bond0" does not exist. Aug 21 11:37:21 r15 sudo[1942]: pam_unix(sudo:session): session closed for user root Aug 21 11:37:21 r15 sudo[1965]: root : PWD=/ ; USER=root ; COMMAND=/usr/bin/sh -c '/usr/sbin/vyshim VYOS_TAGNODE_VALUE=\'lo\' /usr/libexec/vyos/conf_mode/interfaces_loopback.py' Aug 21 11:37:21 r15 sudo[1965]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0) Aug 21 11:37:21 r15 vyos-configd[753]: Received message: {"type": "node", "last": false, "data": "VYOS_TAGNODE_VALUE=lo/usr/libexec/vyos/conf_mode/interfaces_loopback.py"} Aug 21 11:37:22 r15 vyos-configd[753]: Sending response 1 Aug 21 11:37:22 r15 sudo[1965]: pam_unix(sudo:session): session closed for user root Aug 21 11:37:22 r15 sudo[2000]: root : PWD=/ ; USER=root ; COMMAND=/usr/bin/sh -c '/usr/sbin/vyshim VYOS_TAGNODE_VALUE=\'eth2\' /usr/libexec/vyos/conf_mode/interfaces_ethernet.py'
prio:
vyos@r15# /usr/libexec/vyos/priority.py | match "bond|conntrack" 218 system_conntrack.py ['system', 'conntrack'] 320 interfaces_bonding.py ['interfaces', 'bonding'] 799 service_conntrack-sync.py ['service', 'conntrack-sync'] [edit] vyos@r15#
it seems 218 system_conntrack.py calls 799 service_conntrack-sync.py but interface bonding does not exist on this step prio 320
https://github.com/vyos/vyos-1x/blob/2277371fe18577502ce318c23789f86d1ec97be7/src/conf_mode/system_conntrack.py#L109-L110
1.4.0 is not affected as bug started in this commit
vyos-1x
# fail 65d4ee332 configdep: T6559: add smoketest of dependency script error 08f524a62 configdep: T6559: use single dependency list with reset under configd # first fail commit 655ad2e9a configdep: T6559: drop global redundancy removal to fix error reporting # good b81fa2e6c Merge pull request #3814 from vyos/mergify/bp/sagitta/pr-3810